500 OOPS: vsftpd: refusing to run with writable anonymous root

500 OOPS: vsftpd: refusing to run with writable anonymous root解决方法
新的vsftp的上传目录改为了/srv/ftp,为了给予上传的权限,我给权限为:sudo chmod 777 /srv/ftp
登录结果为:
fantasy0707@fantasy0707-desktop:/srv$ ftp localhost
Connected to localhost.
220 Welcome to fantasy0707 FTP service.
Name (localhost:fantasy0707): anonymous
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable anonymous root
Login failed.
小看下文档才发现是权限给的太宽了,更改下:
sudo chmod 775 /srv/ftp
再试下:
fantasy0707@fantasy0707-desktop:/srv$ sudo chmod 775 *
fantasy0707@fantasy0707-desktop:/srv$ ftp localhost
Connected to localhost.
220 Welcome to fantasy0707 FTP service.
Name (localhost:fantasy0707): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls -l
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r--    1 0        0              16 Mar 14 22:27 hello.txt
226 Directory send OK.
ok,登录成功!

--------

今天准备用vsftpd传些东东,确encounter这个错误:500 OOPS: vsftpd: refusing to run with writable anonymous root
无奈google一下,原来是这样呀:
对于vsftpd的根目录 /home/ftp 其权限为:drwxrwxrwx 即完全没有限制(或许是不小心执行了 chmod 777 /home/ftp);
但vsftpd出于安全考虑对 /home/ftp是不允许没有限制的,这导致了上述错误的发生。
所以我们只需做如下更改:
chown root:root /home/ftp
chmod 755 /home/ftp
(如果你不是以root登录,或许前面要加上 sudo ,别忘记)
OK,问题解决了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值