Error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

修复

尝试连接到配置为jail(阻止访问其他目录)的每个FTP用户的vsftpd FTP服务器时,可能会发生此错误。最佳做法是专门为FTP创建无法通过SSH登录的Linux用户。例如,如果要删除testuser的SSH访问权限,则可以使用以下命令:

usermod -s / sbin / nologin testuser

但是,这不会解决错误中列出的问题。为此,您必须将用户的主目录设为只读。假设用户名是testuser,主目录是/ home / testuser,则执行以下命令:

一、

chmod a - w /home/testuser

为了更好地衡量,请务必重新启动vsftpd:

systemctl restart vsftpd

二、

或者,您可以通过运行以下两个命令绕过vsftpd配置文件中的可写检查:

echo 'allow_writeable_chroot = YES' >> /etc/vsftpd/vsftpd.conf

systemctl restart vsftpd

猜你喜欢

转载自blog.csdn.net/MatrixGod/article/details/82697770