我想设置一个匿名的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
这篇博客指出了如何解决这个问题.
问题是用户的根目录是可写的.Frontier Group为您提供vsFTPd的修复程序.
以下是要采取的步骤(如果链接死亡,请从教程中复制粘贴)
以root用户身份登录(或sudo ..)并执行以下操作:
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并添加以下allow_writeable_chroot = YES
sudo服务vsftpd重启