500 OOPS: vsftpd: refusing to run with writable root inside chroot[ubuntu, vsftp]

在新建的FTP服务器中登陆时出现如下的错误提示:

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

意思是不能使用chroot限制可写的根目录,看了下vsftpd的更新日志:

Add stronger checks for the configuration error of running with a writeable root directory inside a chroot(). This may bite people who carelessly turned on chroot_local_user but such is life.

如果开启了chroot来控制用户路径,则用户不能再具有根目录的写权限,把用户根目录的写权限去掉就可以解决问题了。

这样对于ftp根直接为网站根目录的用户不方便,我们可以在根目录下建立二级目录用于ftp上传服务。

解决方法:chmod a-w /chroot目录

参考资料: http://webteam.blog.51cto.com/863355/856727