0

I try to install an FTP server on my rpi with an anonymous access. I have this vsftpd.conf:

listen=NO
listen_ipv6=YES
anonymous_enable=YES
anon_root=/srv/ftp
hide_ids=YES
allow_writeable_chroot=YES
chroot_local_user=YES
chroot_list_enable=NO

local_enable=YES

dirmessage_enable=YES

use_localtime=YES xferlog_enable=YES secure_chroot_dir=/var/run/vsftpd/empty rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=NO

But when I try an anonymous access with Filezilla, the connection failed with the error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot(). Thanks for your help.

1 Answers1

0

vsftpd does not like that secure_chroot_dir is writable.

chmod a-w /var/run/vsftpd/empty

Temporary directory under /var/run may be cleaned and recreated, if so it cannot have the write permission. If using tmpfiles.d, here is a basic drop-in file to do that. User, group, and a lot more are further customizable if needed.

# /etc/tmpfiles.d/vsftpd.conf
# Type Path             Mode
D /var/run/vsftpd/empty 0555
John Mahowald
  • 36,071