一、修改配置文件,允許root登錄
默認情況下vsftp是不允許root用戶登錄的,可以通過修改限制來解決這個問題。
首先找到vsftp的配置目錄
[root@localhost vsftpd]# pwd
/etc/vsftpd
[root@localhost vsftpd]# ls
chroot_list ftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh
[root@localhost vsftpd]#
修改
[root@localhost vsftpd]# cat ftpusers
# Users that are not allowed to login via ftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
修改
[root@localhost vsftpd]# cat user_list
# vsftpd userlist
# 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
上面這個兩個就是默認情況下vsftp不允許使用的賬號列表,講文件中root刪除,或者前面加個#號 重啟一下vsftpd 服務 即可
二、修改配置文件運行匿名登錄
原因:
vsftp服務器安裝后默認不允許本地用戶登錄,出現該錯誤。需要修改vsftp配置文件。
解決:
vi /etc/vsftpd.conf
將local_enable=YES前的#(注釋)取消;
在anonymous_enable=YES前加上#。
重啟vsftp服務:
/etc/init.d/vsftpd restart