vsftp (Very Security Ftp

CentOS 6.2 32bit


参考配置:http://os.51cto.com/art/201008/221842.htm
http://bbs.51cto.com/thread-717151-1.html 

http://os.51cto.com/art/201008/222036.htm 51cto专题
http://os.51cto.com/art/201008/221633.htm 玩转vsftpd服务器的四大高级配置--李洋

安装:
[root@localhost ~]# yum search vsftpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
================================================ Matched: vsftpd ================================================
vsftpd.i386 : vsftpd - Very Secure Ftp Daemon
[root@localhost ~]#
配置文件说明:
[root@localhost pub]# grep -v "^#" /etc/vsftpd/vsftpd.conf | grep -v '^$'
anonymous_enable=YES                      允许匿名登录
local_enable=YES
write_enable=YES                              给予写权限
local_umask=022
anon_upload_enable=YES                    匿名用户上传
anon_mkdir_write_enable=YES           匿名账号创建文件夹
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES              
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
 [root@Cacti8a pub]#


[root@localhost ftp]# ll
total 4
drwxr-xr-x. 2 root root 4096 Jun 17 15:03 pub
[root@localhost ftp]# chmod 1777 pub/
[root@localhost ftp]# ll
total 4
drwxrwxrwt. 2 root root 4096 Jun 17 15:03 pub
[root@localhost ftp]#
匿名用户的下载目录,此目录需赋权根chmod 1777 pub(1为特殊权限,使上载后无法删除)

useradd ftp01 -s /sbin/nologin -d /data/ftp01/
建立ftp01账号(不允许登录系统),指定根目录为 /data/ftp01/

password ftp01   (配置账号密码)
:password
修改 /data/ftpshenq/ 目录读写权限
chmod 1777  /data/ftpshenq/

启动服务:
service vsftpd start
测试上传下载文件,完成。