荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: zzt (我命由我不由天), 信区: Linux
标  题: wu-ftp的配置1
发信站: BBS 荔园晨风站 (Tue Jun  6 21:21:22 2000), 转信

【 以下文字转载自 zzt 的信箱 】
【 原文由 zzt.bbs@bbs.dot66.net 所发表 】
作者: joe (左右为难) 站内: Linux
标题: wu-ftp的配置1
时间: Tue May 23 11:02:53 2000


1./etc/ftpaccess的设定
这个配置文件是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: 权限最低的匿名用户。
例如:
clss 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.
ftp服务器可以识别的变量:
%T 本地时间
%F CWD所在分区的剩余空间。K为单位。不是所有系统支持。
%C 当前的工作目录
%E 管理员的e-mail地址
%R 远端主机名
%L 本地主机名
%U 用户名
%M 这个类别所允许的最大连接数目
%N 这个类别当前连接的数目
readme 说明文件 指令
当用户执行所设定的指令时,系统会显示所说明的说明文件
readme  README*    cwd=*
表示用户切换目录时,只要是以README打头的文件都会显示出来。
message 说明文件 指令
当用户执行所设定的指令时,系统会将文件的内容显示出来。
compress (yes/no) 类别
设定哪一个类别的用户可以使用compress功能。
例如: compress yes local remote
tar 与compress 类似
private (yes/no)
设定是否支持群组对文件的取用
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)
设定当用户使用anonumous帐号登陆时的密码使用方式,下面是个选项的说明
none 表示不做密码验证。
trival 任何包含"@"的密码就可以
rfc822 一定要符合rfc822的e-mail地址规格。
enfoce密码不符合不能登陆。
warn 密码不符合警告。
log commands 类别(real/guest/anoymous)
设定哪些用户登陆时,所使用的操作会被记录在/var/adm/xferlog里。
log transfers 类别(real/guest/anonumous) (inbound/outbound)
设定所指定的用户群组在上载(inbount)或是下载时有关的信息会记录到
/var/adm/xferlog中。
shutdown 文件名
  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来建立。
delete (yes/no) (real/anonymous/guest)
设定是否允许指定用户使用delete这个指令。
override
readme
chmod
umask
类似
upload 根目录 上载目录 (yes/no) 用户群组权限 (dirs/nodirs)
这个命令设定哪一个目录是可以上载文件的。
如:
upload /home/ftp /incoming yes root daemon 0600 dirs
表示/home/ftp是指定目录,在这个目录中只有incoming这个子目录可以上载文件,而上
载文件
的只有root用户而且群组上daemon,文件的操作权限是0600,也就是rw-------,dirs是指
可以在
这个目录中建立子目录。
upload /home/ftp /bin no
upload /home/ftp /etc no
alias 目录别名 目录
例如: alias inc incoming
cdpath 目录
用于cd命令时的路径搜索
path-filter (read/anonymous/guest) 目录
设定上载时的文件名限制
guestgroup 功能
设定guest组的功能
例如: guestgroup ftponly
e-mail guest的e-mail地址
deny IP地址/域名 说明文件
设定限制哪一个IP地址或域名无法登入Ftp服务器
deny 192.192.69.* *.com.cn /etc/deny.msg
deny !nameserved /etc/deny.msg
这是一种比较特殊的用法,用来设定用户的IP地址必须由Reserve Domain的方式找到对
应的域名才
能连接到ftp服务器。
2./etc/ftpusers 和/etc/ftphosts的设定

--
「你不知道小镇的死样。」她说。「每一个人都知道你是什麽人。在城市里你?
  真正过自己的生活。假如想交朋友, 千千万万人任你选, 可以看戏, 看橱窗,
  真正的美容院, 当然还有好的餐厅。」
「当然还有激烈的竞争, 不正常的诈欺, 太多的车辆, 紊乱的交通, 停车的困?
  弄不清的单行道, 各种污染。」我说。「至於交朋友嘛--假如你真想单独生?
  你才会去大都市。所有人都是外人, 接触方式不对, 他们永远是外人。」
--
※ Origin: 笑 书 亭 <bbs.dot66.net>
◆ From: 10.11.81.195
--
※ 转载:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 192.168.1.11]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店