开始学习Solaris 10 自带的wu-ftp 2.6,这是一些笔记,心得,资料出处
Solaris 10中的wu-ftp版本是2.6.2与Solaris 9中的一样,我现在看的两篇文章是《wu-ftpd服务器配置手册》,地址http://www.douzhe.com/linuxtips/1432.html和《Solaris自带的FTP服务之九阳神功》,地址http://bbs.chinaunix.net/forum/viewtopic.php?t=517830&show_type=new个人比较喜欢后面这篇,但是楼主被人打击只写了一篇就放弃了,实在遗憾。为了测试还参考了《FTP命令行使用精萃》地址:http://www.douzhe.com/linuxtips/1424.html,写了一半发现资料不够用,又google了一篇,《Debian服务器设置入门教程之二 》地址http://tech.ccidnet.com/pub/article/c737_a218449_p1.html
ftp的配置文件在/etc/ftpd/目录下,主要有ftpaccess,shut.msg,banner.msg,ftpconversions,ftphosts,ftpgroups,ftpservers,ftpusers,welcome.msg。打开ftpaccess后可以看见
#dtpad /etc/ftpd/ftpaccess
# ident "@(#)ftpaccess 1.2 03/05/14 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#
class realusers real *
class guestusers guest *
class anonusers anonymous *
loginfails 3
passwd-check trivial warn
private no
shutdown /etc/ftpd/shutdown.msg
# email user@hostname
# guestuser username
# rhostlookup noX-MEAGER
keepalive yes
recvbuf 65536 real,guest,anonymousX-MEAGER
sendbuf 65536 real,guest,anonymous
# flush-wait no anonymous
# passive ports 0.0.0.0/0 32768 65535
# timeout data 600
# timeout idle 300
banner /etc/ftpd/banner.msg
greeting text geeting text
message /etc/ftpd/welcome.msg login
message .message cwd=*
readme README* login
readme README* cwd=*
# quota-info *
chmod no anonymous
delete no anonymous
overwrite no anonymous
rename no anonymous
umask no anonymous
compress yes realusers guestusers anonusers
tar yes realusers guestusers anonusers
path-filter guest,anonymous /etc/ftpd/filename.msg ^[[:alnum:]._-]*$ ^[.-]
noretrieve relative class=anonusers /
allow-retrieve relative class=anonusers /pub
upload class=anonusers * * no nodirs
# upload class=anonusers * /incoming yes ftpadm ftpadm 0440 nodirs
# log commands real,guest,anonymous
# log security real,guest,anonymous
# log transfers real,guest,anonymous inbound,outbound
# xferlog format %T %Xt %R %Xn %XP %Xy %Xf %Xd %Xm %U ftp %Xa %u %Xc %Xs %Xr
# limit-time anonymous 30
# limit anonusers 10 Wk0730-1800 /etc/ftpd/toomany.msg
# limit anonusers 50 SaSu|Any1800-0730 /etc/ftpd/toomany.msg
文件的开头定义了三个类,分别是real,guest,anonymous,格式是 class 类名 [real/guest/anonymous] 允许访问的地址,real:在ftp服务器上有帐号的用户;guest:有记录的匿名用户;anonymous:权限最低的匿名用户,其中允许访问的地址可以用*代替,表示任何地址。
loginfails 3:是指登陆一个用户,输入密码错误几次断开连接。断开连接会显示Connection closed by remote host.
passwd-check none/trivial/rfc822 warn/enforce:设定对匿名用户anonymous的密码使用方式。none:不做密码验证,匿名用户可以用任何密码登陆;trivial:匿名用户的密码中必须包括@;rfc822:密码一定要符合rfc822中规定的E-mail格式才可以。warn:密码不符合规定时,匿名用户仍可以登陆,但想其显示警告信息;enforce:密码不符合规定时 警告并终止连接。
private yes/no:支持/不支持群组对文件的使用。在/etc/ftpd/ftpgroups具体设置。
keepalive yes/no:是否在对话过程中保持数据通道的活动状态。
banner /etc/ftpd/banner.msg banner指名一个文件,在输入用户名和密码之前显示,显示的信息在banner.msg文件中。
greeting brief/full/terse/text+显示的文字 ,其中默认的是brief。定义用户在登陆之前显示的信息,在banner之后。full:向用户显示主机名和ftp版本;brief:只向用户显示主机名;terse:只向用户显示“FTP Server Ready”;text+显示的文字:可以显示想在登陆之前的信息例如:greeting text 这是我的ftp学习试验田,将会在登陆前显示“这是我的ftp学习试验田”这句话。
文章来源于领测软件测试网 https://www.ltesting.net/