错误消息"500 OOPS:vsftpd:拒绝在chroot()内部使用可写根运行"

MrR*_*ROY 25 linux ftp ubuntu

我想设置一个匿名的FTP服务器(能够上传文件).这是我的配置文件:

listen=YES

anonymous_enable=YES
anon_root=/var/www/ftp

local_enable=YES
write_enable=YESr.

anon_upload_enable=YES
anon_mkdir_write_enable=YES

xferlog_enable=YES
connect_from_port_20=YES

chroot_local_user=YES

dirmessage_enable=YES
use_localtime=YES
secure_chroot_dir=/var/run/vsftpd/empty
rsa_cert_file=/etc/ssl/private/vsftpd.pem
pam_service_name=vsftpd
Run Code Online (Sandbox Code Playgroud)

但是当我尝试连接它时:

kan@kan:~$ ftp yxxxng.bej
Connected to yxxx.
220 (vsFTPd 2.3.5)
Name (yxxxg.bej:kan): anonymous
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

blo*_*p3r 61

这篇博客指出了如何解决这个问题.

http://www.mikestechblog.com/joomla/operating-systems-section/operating-systems-ubuntu/155-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot.html

问题是用户的根目录是可写的.Frontier Group为您提供vsFTPd的修复程序.

以下是要采取的步骤(如果链接死亡,请从教程中复制粘贴)

  1. 以root用户身份登录(或sudo ..)并执行以下操作:

  2. apt-get install python-software-properties

  3. sudo add-apt-repository ppa:thefrontiergroup/vsftpd

  4. sudo apt-get update

  5. sudo apt-get install vsftpd

  6. vi /etc/vsftpd.conf并添加以下allow_writeable_chroot = YES

  7. sudo服务vsftpd重启

  • 这不是关闭主题......但我不建议这个建议,并坚持"安全"建议.你所要做的就是``chmod ugo -w/path/to/directory`` (30认同)
  • ubuntu发行版中的vsftpd发行版IGNORES`allow_writeable_chroot`选项以及此处提供的一个版本不再可用.这个答案不再有用. (17认同)
  • `W:无法获取http://ppa.launchpad.net/thefrontiergroup/vsftpd/ubuntu/dists/wheezy/main/source/Sources 404 Not Found W:无法获取http://ppa.launchpad.net/thefrontiergroup/vsftpd/ubuntu/dists/wheezy/main/binary-i386/Packages 404 Not Found E:某些索引文件无法下载.它们被忽略了,或者旧的被使用了.它不能成为答案 (9认同)
  • allow_writeable_chroot = YES并重启vsftpd.就这些 (5认同)
  • 呃WTF.不要从互联网上安装一些随机人员的存储库.只需添加allow_writeable_chroot = YES选项即可! (4认同)
  • 基本上,创建一个像`/var/www/ftp/files`这样的子目录,它有写权限。然后使用 `sudo chmod aw /var/www/ftp` 从根 ftp 目录中获取写入权限。 (2认同)