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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16102996/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 22:45:07  来源:igfitidea点击:

Error message "500 OOPS: vsftpd: refusing to run with writable root inside chroot()"

linuxubuntuftp

提问by WoooHaaaa

I want to setup an anonymous only FTP server (able to upload files). Here is my configuration file:

我想设置一个仅匿名的 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

But when I try to connect it:

但是当我尝试连接它时:

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

How can I fix this?

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

采纳答案by blo0p3r

This blog here points out how to fix this problem.

这篇博客在这里指出了如何解决这个问题。

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

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

The issue being that the user's root directory is writable. The Frontier Group provides you with a fix on vsFTPd.

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

Here are the steps to be taken (copy paste from the tutorial, in case the link dies)

以下是要采取的步骤(从教程中复制粘贴,以防链接失效)

  1. login as root (or sudo..) and do the following:

  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 and add the following allow_writeable_chroot=YES

  7. sudo service vsftpd restart

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

  2. apt-get install python-software-properties

  3. 须藤添加-apt-repository ppa:thefrontiergroup/vsftpd

  4. sudo apt-get 更新

  5. 须藤 apt-get 安装 vsftpd

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

  7. 须藤服务 vsftpd 重启