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
Error message "500 OOPS: vsftpd: refusing to run with writable root inside chroot()"
提问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.
这篇博客在这里指出了如何解决这个问题。
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)
以下是要采取的步骤(从教程中复制粘贴,以防链接失效)
login as root (or sudo..) and do the following:
apt-get install python-software-properties
sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
vi /etc/vsftpd.conf and add the following allow_writeable_chroot=YES
sudo service vsftpd restart
以 root ( 或 sudo .. ) 身份登录并执行以下操作:
apt-get install python-software-properties
须藤添加-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get 更新
须藤 apt-get 安装 vsftpd
vi /etc/vsftpd.conf 并添加以下 allow_writeable_chroot=YES
须藤服务 vsftpd 重启