在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的日志文件以获取更多详细的错误信息。