无法使vsftpd工作,以匿名方式登录


1

我想配置我的vsftpd服务器以接受匿名FTP。

我使用了以下内容 /etc/vsftpd.conf

listen=YES
anonymous_enable=YES

local_enable=NO

write_enable=YES
anon_root=/tmp/
anon_max_rate=2048000
xferlog_enable=YES
allow_writeable_chroot=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=NO
chroot_list_enable=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

然后我重新启动vsftpd:

sudo service vsftpd restart

然后我尝试从另一台PC连接到FTP服务器“匿名”, 但是我收到了一个错误:

$ ftp 192.168.1.68
Connected to 192.168.1.68.
220 (vsFTPd 3.0.2)
Name (192.168.1.68:mohamed): anonymous
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
ftp>

我错过了什么?

Answers:


1

这是一个“新”的安全功能 vsftpd: refusing to run with writable root inside chroot

您必须在根目录上禁用写权限 chmod a-w yourdirectory

这足以让我搬到 纯FTPD


在我的情况下,根目录是什么?
Mohamed KALLEL

你已经设定好了 anon_root=/tmp 但我不建议在tmp上禁用写权限,这会影响许多其他事情,更好地制作另一个目录
Sidias-Korrado
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.