ftpd -u 002 引數的應用

zhulch發表於2007-02-07
....[@more@]

今天客戶說FTP 上面的檔案許可權不夠,預設的FTP 許可權是027 ,根據需要更改為002 .

1 .檢視幫助

ftpd Daemon

Purpose

Provides the server function for the Internet FTP protocol.

Syntax

Note: The ftpd daemon is usually started by the inetd daemon. It
can also be controlled from the command line, using SRC commands.

/usr/sbin/ftpd [ -d ] [ -f ] [ -ff ] [ -k ] [ -l ] [ -U ] [ -t TimeOut
] [ -T MaxTimeOut ] [ -s ] [ -u OctalVal ] [-q [-C]]

Description

The /usr/sbin/ftpd daemon is the DARPA Internet File Transfer Protocol
(FTP) server process. The ftpd daemon uses the Transmission Control
Protocol (TCP) to listen at the port specified with the ftp command
service specification in the /etc/services file.

-u OctalVal
Sets the ftpd daemon's umask. The OctalVal variable must be
specified as an octal value to define the umask. The default umask
is an octal value of 027, which results in file permissions of
rw-r-----.

2 .修改/etc/inetd.conf 中FTPD 相關的檔案

#ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd
ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -u 002

3 .Restart inetd 程式

:/etc>ps -ef | grep inetd
root 114848 168044 0 Jan 30 - 0:00 /usr/sbin/inetd
root 962762 725026 0 15:58:05 pts/5 0:00 grep inetd
:/etc>kill -HUP 114848

4.測試所有FTP 上去的許可權都為RW-RW-R 的許可權了

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7318139/viewspace-898166/,如需轉載,請註明出處,否則將追究法律責任。

相關文章