yum install vsftpd -y
touch /etc/vsftpd/chroot_list 可以切换root目录的用户
增加用户:useradd -s /sbin/nologin ftpuser
设置密码:passwd ftpuser
配置文件:/etc/vsftpd/vsftpd.conf
anonymous_enable=NO
reverse_lookup_enable=NO
allow_writeable_chroot=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=NO
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
#chown_username=whoever
xferlog_file=/var/log/xferlog
xferlog_std_format=YES
dual_log_enable=YES
vsftpd_log_file=/var/log/vsftpd.log
idle_session_timeout=600
data_connection_timeout=1200
pasv_max_port=10000
pasv_min_port=11000
#nopriv_user=ftpsecure
async_abor_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd/banned_emails
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
ls_recurse_enable=NO
listen=YES
listen_ipv6=NO
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
问题解决:
Centos7.6更新后,发生VSFTP不能使用,验证失败
由于在/etc/pam.d/vsftpd 文件中,增加了一个行验证shell的模块
去掉:# auth required pam_shells.so 即可