用本機用戶登錄vsftp出現錯誤:
登錄失敗原因:
vsftp服務器安裝後默認不允許本地用戶登錄,出現該錯誤,電腦,需要修改vsftp配置文件。
解決:
vim /etc/vsftpd.conf vi /etc/vsftpd.conf
Now, the following lines will be commented, uncomment them.
將local_enable=YES, write_enable=YES前的#註釋取消;
local_enable=YES – this lets the local users login via FTP
write_enable=YES – this lets the users upload files
在anonymous_enable=YES前加上#註釋
Save and quit the file.
重啓vsftp服務:
/etc/init.d/vsftpd restart
root@ubuntu:~#ftpftp> open 127.0.0.1Connected to 127.0.0.1.220 (vsFTPd 2.3.5)Name (127.0.0.1:pipi): pipi331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>from:
ref:530 This FTP server is anonymous only. Login failed.
登陸ftp時再輸入用戶名和密碼出現:500 OOPS: cannot change directory:/home/**********
解決方法:在終端輸入 setsebool ftpd_disable_trans 1 然後重啓vsftp服務 service vsftpd restart 如果輸入上述命令時出現:Could not change active booleans:
Invalid boolean 是因爲SELinux的問題接着在終端輸入:setsebool ftp_home_dir=1 重啓vsftp服務即可解決問題