现在的位置: 首页 > 综合 > 正文

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

2013年10月24日 ⁄ 综合 ⁄ 共 1197字 ⁄ 字号 评论关闭
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,问题解决了。

抱歉!评论已关闭.