I'm having problems setting up correctly VSFTPD with chroot on a Ubuntu 14.04 (LTS) server. No matter what I try, I keep being allowed to freely navigate the server.
Here is my /etc/vsftpd.conf
file (stripped of the commented parts)
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
# CHROOT'ING
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
ssl_enable=Yes
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
The file /etc/vsftpd.chroot_list
contains just the user ftpuser
with the intent of him being allowed to navigate all the server.
For test purposes I create the user 'user1'. When I
sftp user1@ftp-server
I login into its /home/user1.But, still, I can navigate all the server without any jailing.
What am I doing wrong?
EDIT vsftpd version: 3.0.2
UPDATE
Problem doesn't seem related to chroot at all. Actually it works just fine under protocol FTP. Suppose SSH server intercepts incoming connections on port 22, so it isn't dispatched to vsftpd. Just a guess.