120 userlist_file=/etc/vsftpd/user_list
更改上边对应的行
[root@localhost vsftpd]# ls
ftpusers user_list vsftpd.conf vsftpd.conf.bak vsftpd_conf_migrate.sh
在user_list中添加yangjj用户,不允许yangjj访问
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
yangjj
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
此时访问ftp,你会发现无法访问,这是由于SELinux引起的。
[root@localhost yjj]# setsebool -P ftpd_connect_db=on