以下是VSFTP在CentOS上常見錯誤代碼及處理方法:
530 Login incorrect(登錄失?。?/strong>
/etc/ftpusers
黑名單。/etc/pam.d/vsftpd
中未限制登錄,如注釋掉pam_listfile.so
相關行。500 OOPS: cannot change directory(無法切換目錄)
/var/ftp
目錄權限,需設置為root:root
且權限755,不可為777。chroot_local_user=YES
已配置。setsebool -P ftpd_disable_trans 1
,若問題解決則需調整SELinux策略。553 Could not create file(無法創建文件)
chmod 775
或777
),并確保SELinux允許FTP寫入:setsebool -P ftp_home_dir 1
。其他通用步驟
systemctl status vsftpd
,確保服務運行。/var/log/vsftpd.log
或/var/log/secure
,獲取具體錯誤信息。參考來源: