Linux:vsftpd

[[email protected] ~]# yum install -y vsftpd

[[email protected] ~]# mv /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak

[[email protected] ~]# grep -v "#" /etc/vsftpd/vsftpd.conf.bak > /etc/vsftpd/vsftpd.conf


[[email protected] ~]# cd /etc/vsftpd

[[email protected] vsftpd]# vi vuser.list

zhangsan

redhat

lisi

redhat


[[email protected] vsftpd]# db_load -T -t hash -f vuser.list vuser.db

[[email protected] vsftpd]# chmod 600 vuser.db 


[[email protected] ~]# vi /etc/pam.d/vsftpd.vu

auth    required  /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser

account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser


[[email protected] ~]# vi /etc/vsftpd/vsftpd.conf

anonymous_enable=NO

local_enable=YES

write_enable=YES

local_umask=022

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

xferlog_std_format=YES

listen=YES

guest_enable=YES

guest_username=apache

user_config_dir=/etc/vsftpd/vconf

chroot_local_user=YES

pam_service_name=vsftpd.vu

userlist_enable=YES

tcp_wrappers=YES


[[email protected] ~]# cd /etc/vsftpd/vconf

[[email protected] vconf]# cat lisi 

local_root=/var/www/html

anon_upload_enable=YES

anon_mkdir_write_enable=YES

anon_other_write_enable=YES


猜你喜欢

转载自blog.51cto.com/13598811/2379811
0条评论
添加一条新回复