3

The situation:

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 /home/xxx/files.

  • The folder /home/xxx is owned by root.
  • The folder /home/xxx/files is owned by xxx and 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 /etc/vsftpd.conf file:

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

The problem:

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 (3.12.0.2) at the address 127.0.0.1

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.


EDIT

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
4
  • Did you just set the new directory (usermod -d) or did you move the old contents into it (-m)? What filesystem is on the new disk? Aug 31, 2016 at 12:04
  • @steeldriver Yes, I did with usermod -d. There is (yet) no content in that folder. The filesystem is Ext4.
    – toesslab
    Aug 31, 2016 at 12:19
  • @steeldriver To be precise the users (xxx) folder is newly created therefore empty, except .bash_logout, .bashrc and .profile
    – toesslab
    Aug 31, 2016 at 13:41
  • @steeldriver added nmapoutput
    – toesslab
    Sep 5, 2016 at 11:51

0

You must log in to answer this question.

Browse other questions tagged .