0

I am attempting to set up a FTP account for each user (using VSFTPD on Ubuntu 18.04), where each user is jailed to their home directories.

Let's call this user 'fred'

So far I have added the user (adduser fred), created the user directory (mkdir /var/www/fred), set user home directory to '/var/www/fred', set the ownership (chown fred:fred /var/www/fred), set permissions (chmod 750 /var/www/fred) and added fred to /etc/vsftpd.userlist. Now, I try to log in via FTP (FileZilla) as fred and I get:

Error: GnuTLS error -15: An unexpected TLS packet was received.

I can update my vsftpd.conf file to allow me (fred) to log in if I change:

chroot_local_user=No

However, if I do this, fred is free to roam anywhere fred wants to on the server - not ideal.

Here is the vsftpd.conf:
listen=Yes
anonymous_enable=No
local_enable=Yes
write_enable=Yes
local_umask=022
chroot_local_user=Yes
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/vsftpd/vsftpd.pem
rsa_private_key_file=/etc/vsftpd/vsftpd.key
ssl_enable=Yes
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=50000
pasv_address=xxx.xxx.xxx.xxx (masked)
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
user_sub_token=$USER
local_root=/var/www/$USER
userlist_enable=Yes
userlist_file=/etc/vsftpd.userlist
userlist_deny=No
vsftpd_log_file=/var/log/vsftpd.log

looking at fred some more: "ls -l /var/www": drwxr-x---- 2 fred fred 4096 Apr 22 22:03 fred "less /etc/passwd" (excerpt): fred:x:1001:1001:fred,,,:/var/www/fred:/bin/bash

I'm sure this is probably a combination of me not understanding permissions/groups and/or the vsftpd.conf file, but I'm completely at a loss here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.