在Debian系統上使用vsftpd(Very Secure FTP Daemon)時,可能會遇到各種錯誤。以下是一些常見的錯誤及其排查技巧:
500 OOPS: vsftpd: cannot locate user specified in ‘ftp_username’:ftp
/etc/vsftpd/vsftpd.conf
,將 anonymous_enable
設置為 NO
,以禁用匿名登錄。local_enable
、write_enable
等。/var/log/vsftpd.log
或 /var/log/messages
以獲取更多錯誤信息。530 Permission denied
/etc/vsftpd/vsftpd.conf
中的 userlist_enable
和 userlist_file
設置。local_enable
、write_enable
等。config file not owned by correct user, or not a file
ll /etc/vsftpd.conf
命令查看文件屬主和權限。cannot change directory:/home/
getsebool -agrep ftp
命令檢查相關設置。setsebool
命令開啟必要的SELinux布爾值,例如 setsebool ftpd_disable_trans 1
或 setsebool ftp_home_dir 1
。確保你的vsftpd配置文件 /etc/vsftpd/vsftpd.conf
中包含以下基本設置:
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES
在修改配置文件后,務必重啟vsftpd服務以使更改生效:
sudo systemctl restart vsftpd
或者
sudo service vsftpd restart
通過以上步驟和解決方案,你應該能夠解決大多數vsftpd在Debian系統上遇到的錯誤,并成功搭建和配置FTP服務器。如果問題仍然存在,建議查看vsftpd的日志文件以獲取更多詳細的錯誤信息。