# vi /etc/vsftpd-ano.conf ,将如下三行加入文件
listen=YES
listen_port=21
tcp_wrappers=YES
anon_root=/var/ftp //设置匿名用户本地目录,和ftp用户目录必须相同
listen=YES的意思是使用standalone启动vsftpd,而不是super daemon(xinetd)控制它 (vsftpd推荐使用standalone方式)
# /usr/local/sbin/vsftpd-ano /etc/vsftpd-ano.conf & //以后台方式启动vsftpd
注意:每行的值都不要有空格,否则启动时会出现错误,举个例子,假如我在listen=YES后多了个空格,那我启动时就出现如下错误:
500 OOPS: bad bool value in config file for: listen
测试搭建好的匿名用户方式
# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.3)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>; pwd
257 "/"
ftp>; quit
221 Goodbye.
#
OK,已经完成了,very nice.