anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=NO
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
guest_enable=YES
guest_username=vsftpd
pam_service_name=vsftpd.mysql
user_config_dir=/etc/vsftpd/vusers_dir
anon_root=/var/ftp
ftp_username=vsftpd
anon_umask=022
shell> cat /etc/passwd | grep -v vsftpd | awk -F ':' '{print $1}' >> /etc/vsftpd.user_list
auth required /lib/security/pam_mysql.so user=vsftpd passwd=vsftp host=localhost db=vsftp table=users usercolumn=name passwdcolumn=passwd crypt=2
account required /lib/security/pam_mysql.so user=vsftpd passwd=vsftp host=localhost db=vsftp table=users usercolumn=name passwdcolumn=passwd crypt=2
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth required pam_shells.so
auth include password-auth
account include password-auth
session required pam_loginuid.so
session include password-auth
shell> mkdir -p /etc/vsftpd/vusers_dir
shell> cd /etc/vsftpd/vusers_dir
shell> touch testuser
shell> setenforce 0
shell> vi /etc/sysconfig/iptables
shell> /usr/local/sbin/vsftpd &