0

I no pro with this but I have managed multiple times to install vsftpd on centos 6+ and always got it working with or without TLS. But for 24 hours now I haven't been able to get it working on a fresh install of Centos 7.1.

I think I have followed every tutorial there is now on the web. ;) But still no success.

Maybe someone can see something I'm doing wrong?

Currently my /etc/vsftpd/vsftpd.conf looks like the following:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=NO     <-- tried both yes and no
xferlog_std_format=YES
chroot_local_user=YES

listen=YES               <-- tried both yes and no
listen_ipv6=NO           <-- tried both yes and no

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=NO      <-- tried both yes and no
force_local_logins_ssl=NO    <-- tried both yes and no

ssl_tlsv1=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/vsftpd/ssl/vsftpd.pem
rsa_private_key_file=/etc/vsftpd/ssl/private/vsftpd.key

vsftpd has been restarted after every change and tested. When checking systemctl status vsftpd its active and running.

At first firewalld was running and i had opened port 21 with --permanent and reloaded the firewalld. Then I turned it off without luck.

I'm trying to login with a non-root user that works fine through SSH. I have tried with and without TLS. Feels like I'm missing something tiny and "stupid" like a comma somewhere.

When I try to connect I use transmit from a Mac. Without TLS I get error code 203. With TLS error 157.

If these two are set to YES:

force_local_data_ssl=YES
force_local_logins_ssl=YES

And I try without TLS I get an error saying that I need to enable a secure connection. So it looks like its somehow working, just doesn't want to let me in somehow.

Any suggestions of what might be askew?

just_user
  • 202
  • 2
  • 8

1 Answers1

0

After more research and trying I found this answer: https://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/

by adding this:

allow_writeable_chroot=YES

I can now login without a problem.

However, when turning on the firewall again TLS isn't working. So for the moment I'm stuck with less secure SFTP. If you know a solution to that problem please add a comment or a response!

just_user
  • 202
  • 2
  • 8