Linux啟動ftp服務器530 Permission denied解決方法
重新在虛擬機下安裝了linux。現在我想啟動linux自帶的ftp服務器:#service vsftpd start 。如果想linux啟動是自動啟動ftp服務器:#chkconfig vsftpd on 。
運行putty,以root身份進入,出現了報錯 530 Permission denied ,感覺很奇怪,因以普通用戶是可以進入的。
原因是我們 /etc/vsftpd/ftpusers 和 /etc/vsftpd/user_list 禁掉了root這個用戶。這時我們需要修改這兩個文件。
(1)/etc/vsftpd.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
mail
news
uucp
operator
games
nobody
這時我們要在 root 前加上 # 。
(2)/etc/vsftpd.ftpusers 的默認文件(所有可以登錄該FTP的用戶屬性)
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
這時我們要在 root 前加上 # 。