5

I have installed ubuntu 12.04 with vsftpd. I need to create FTP users able to access only directories like /var/www/nameDirectory. I thought it was a very basic feature, but seems not I tried to use, in vsftpd.conf

chroot_local_user=YES

but (created the user 'test' with adduser) 'test' is still able to surf the filesystem. I managed to change root directory of 'test' (with usermod) to /var/www/nameDirectory but he is still able to go back to /var or /.

Then I tried

chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

Created the list file and put 'test' inside it. No fortune, as well.

At the end I tried even to follow this https://askubuntu.com/questions/575523/how-to-setup-virtual-users-for-vsftpd-with-access-to-a-specific-sub-directory but didn't work.

I'm missing something.

The problem is that in FileZilla I can access with user 'test', that land in the correct directory, but have the permission to browse everything.

Here it is my vsftpd.conf

listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
rsa_cert_file=/etc/ssl/private/vsftpd.pem

EDIT: just to play around I tried to set local_enable to NO or write_enable to NO in /etc/vsftpd.conf but no effect (still able to access via FTP, still able to write with user 'test'). Maybe it is the wrong conf file? Or some other software is giving me FTP service? How can I know what is going on?

EDIT 2: Stopped vsftpd (service vsftpd stop) and still able to connect to FTP. How do I know what is giving me FTP access?

1

0

You must log in to answer this question.

Browse other questions tagged .