转载自:https://blog.csdn.net/bluishglc/article/details/42399439
1.vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
当我们限定了用户不能跳出其主目录(chroot_local_user=YES)之后,使用该用户登录FTP时往往会遇到这个错误,这个问题由于版本更新造成的,从2.3.5之后,vsftpd增强了安全检查,如果用户被限定在了其主目录下,则该用户的主目录不能再具有写权限了!如果检查发现还有写权限,就会报该错误。
要修复这个错误,可以用命令chmod a-w /home/user去除用户主目录的写权限,注意把目录替换成你自己的。或者你可以在vsftpd的配置文件中增加下列两项中的一项:
allow_writeable_chroot=YES
2.使用终端ftp可以访问,但是浏览器不可以访问
参考:https://www.cnblogs.com/116970u/p/10788285.html
#1.根据vsftpd的配置文件
#开启被动模式
pasv_enable=YES
#被动模式端口范围
pasv_min_port=6000
pasv_max_port=6010
#需要加入外部ip,否则被动模式会失败
pasv_address=自己的ip地址
pasv_addr_resolve=YES
要是还不行,就使用客户端工具吧,常用的FileZilla个大平台免费使用。
5.vsftpd服务器启动不起来
可以通过systemctl status vsftpd -l查看出现了什么问题,本立当中就是出现了变量错误的情况
[root@MyCentos vsftpd]# systemctl status vsftpd -l
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 三 2019-11-20 19:01:36 CST; 8s ago
Process: 40707 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)
11月 20 19:01:36 MyCentos systemd[1]: Starting Vsftpd ftp daemon...
11月 20 19:01:36 MyCentos vsftpd[40707]: 500 OOPS: unrecognised variable in config file: anno_root
11月 20 19:01:36 MyCentos systemd[1]: vsftpd.service: control process exited, code=exited status=2
11月 20 19:01:36 MyCentos systemd[1]: Failed to start Vsftpd ftp daemon.
11月 20 19:01:36 MyCentos systemd[1]: Unit vsftpd.service entered failed state.
11月 20 19:01:36 MyCentos systemd[1]: vsftpd.service failed.
11月 20 19:01:36 MyCentos vsftpd[40707]: 500 OOPS: unrecognised variable in config file: anno_root
anno_root变量写错了,修改即可
网友评论