这个配置文件是ftp服务器最重要的配置文件,因为它关系到你的FTP服务器能否
正常工作,还有许多权限上的设定。下面来自/usr/doc/wu-ftp../example/:
class all real,guest,anonymous *
limit all 10 Any /etc/msgs/msg.dead
readme README* login
readme README* cwd=*
message /welcome.msg login
message .message cwd=*
compress yes all
tar yes all
log commands real
log transfers anonymous,real inbound,outbound
shutdown /etc/shutmsg
email user@hostname
下面是说明:
loginfails 次数
设定允许用户有几次密码错误的机会。
class 类名 类别 (real,guest,anonymous)IP 地址
这个指令的功能是为设定Ftp服务器上用户的类别。
在Ftp服务器上的用户基本上可以发分为三类:
real : 在ftp服务器上属于有合法帐号的用户。
guest: 另外定义某些使用群组的用户
anonymous: 权限最低的匿名用户。
例如:
class remote real,guest,anonumous*
定义一个名为remote的类,里面有三种类型的用户,"*"代表网络上
的所有机器,也就是说,任何人都可以连到你这台ftp服务器上。如果
你想让某一个IP地址的机器或是某一个网段有特别的访问权限,则可以
这样做:
class local real,guest,anonumous *.zju.edu.cn 100.11.91.11
limit 类别 人数 时间 文件名
这个指令设置同一时间内允许连接的人数。
例如:limit local 20 any /etc/msgs/msg.toomany
limit remote 100 SaSu|Any1800-0600 /etc/msgs/msg.toomany
msg.toomany内容可以为:
There is currently a limit of %M anonymous users.
private <yes|no>;
After user logs in, the SITE GROUP and SITE GPASS commands
may be used to specify an enhanced access group and associated
password. If the group name and password are valid, the user
becomes (via setegid()) a member of the group specified in the
group access file /etc/ftpgroups.
passwd-check (none/trival/rfc822) (enforce/warn)
shutdown <path>;
If the file pointed to by <path>; exists, the server will check
the file regularly to see if the server is going to be shut down.
If a shutdown is planned, the user is notified, new connections
are denied after a specified time before shutdown and current
connections are dropped at a specified time before shutdown.
<path>; points to a file structured as follows:
<year>; <month>; <day>; <hour>; <minute>; <deny_offset>; <disc_offset>;<text>;
<year>; any year >; 1970
<month>; 0-11 <---- LOOK!
<hour>; 0-23
<minute>; 0-59
<deny_offset>; and <disc_offset>; are the offsets in
HHMM format before the shutdown time that new connec-
tions will be denied and existing connections will be
disconnected.
<text>; follows the normal rules for any message (see "mes-
sage", with the following additional magic cookies avail-
able:
%s time system is going to shut down
%r time new connections will be denied
%d time current connections will be dropped
all times are in the form: ddd MMM DD hh:mm:ss YYYY.
There can be only one "shutdown" command in the configura-
tion file.
Ftp服务器关闭的时间可以设定在后面指定的文件中,设定的时间一到,便
无法登陆到Ftp服务器上了,要恢复的话只有将这个文件删除。文件的格式可以
由/etc/ftpshut来建立。