Having a secure FTP-server for backing up data. I installed
vsftpd following this guide. It works as expected with TLS.
- vsftpd: version 3.0.2
- Ubuntu version 15.10
The FTP-user named xxx has his folder on
- The folder
/home/xxxis owned by
- The folder
/home/xxx/filesis owned by
xxxand has read/write permissions.
xxx is able to put files in that folder, so permissions must be set correctly (?)
Here's the output of
sudo ls -la /home/xxx/:
drwxr-xr-x 3 xxx xxx 4096 Aug 30 17:32 . drwx------ 4 root root 4096 Aug 30 17:32 .. drwxr-xr-x 2 xxx xxx 4096 Aug 30 17:32 files
Here is the content of my
listen=YES listen_ipv6=NO anonymous_enable=NO local_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES 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 ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=YES force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO require_ssl_reuse=NO ssl_ciphers=HIGH
As soon as I try to
sudo usermod -d /media/daniel/backups/xxx/files xxx (moving the user xxx's home folder to another disk) I get the following error:
Command: AUTH TLS
Response: 234 Proceed with negotiation.
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Command: USER xxx
Response: 331 Please specify the password.
Command: PASS ******
Error: GnuTLS error -15: An unexpected TLS packet was received.
Error: Could not connect to server
What I don't get is that when having the user xxx in his "normal" home folder it works well with TLS.
For testing purposes I connect with FileZilla (126.96.36.199) at the address
Why do I get this error?
I googled and tried many things but I don't get to a solution. I also have to say that I'm using linux since 6 months only, so I'm not yet very experienced.
The output of
nmap -A 127.0.0.1 is:
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.2 | ssl-cert: Subject: commonName=ubuntu | Not valid before: 2016-05-30T07:15:26+00:00 |_Not valid after: 2026-05-28T07:15:26+00:00