Linux:vsftpd
作者:互联网
[root@king01 ~]# yum install -y vsftpd
[root@king01 ~]# mv /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak
[root@king01 ~]# grep -v "#" /etc/vsftpd/vsftpd.conf.bak > /etc/vsftpd/vsftpd.conf
[root@king01 ~]# cd /etc/vsftpd
[root@king01 vsftpd]# vi vuser.list
zhangsan
redhat
lisi
redhat
[root@king01 vsftpd]# db_load -T -t hash -f vuser.list vuser.db
[root@king01 vsftpd]# chmod 600 vuser.db
[root@king01 ~]# 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
[root@king01 ~]# 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
[root@king01 ~]# cd /etc/vsftpd/vconf
[root@king01 vconf]# cat lisi
local_root=/var/www/html
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
标签:vuser,enable,etc,king01,vsftpd,Linux,root 来源: https://blog.51cto.com/13598811/2379811