vsftpd - 500 OOPS: vsftpd: refusing to run with writable root inside chroot() - /usr/share/empty/ - centos7
问题:centos7系统,用rpm安装的vsftpd,systemctl启动后,ftp localhost 连接会报错:500 OOPS: vsftpd: refusing to run with writable root inside chroot()
尝试:
- 在vsftpd.conf配置文件里添加 allow_writeable_chroot=YES ,无效
- 尝试在SELinux里设置权限 setsebool -P allow_ftpd_full_access on ,无效
- 尝试更换新版本的rpm安装,无效
- 手动启动vsftpd,在命令行里逐个传递参数测试。当测试到 secure_chroot_dir 指定值时,有效
- 反查到 /usr/share/empty 目录有全用户写权限(777),取消写权限(755,root属主)。再使用sysmtemctl启动,有效
secure_chroot_dir
This option should be the name of a directory which is empty. Also, the directory should not be writable by the ftp user. This directory is used as a secure chroot() jail at times vsftpd does not require filesystem access.
Default: /usr/share/empty
参考: