I know this question is posted many times on StackExchange, but none of the solutions worked for me.

I use vsftpd server on ubuntu and I want to restrict the access (read-only) for a user to a given subdirectory only. Most of the solutions I found said that changing the home-directory of a user does the job:

usermod -d /home/subdirectory <username>

with previously setting in /etc/vsftpd.conf:

local_enable = YES

and add the username to /etc/vsftpd.chroot_list.

Anyway, this works fine if I use a browser. It directs me to the given home directory and I cannot access its parents.

The problem is when I use FileZilla. I connect directly to the home directory but I can also see and access the parent directories (and files within).

I also tried some other solutions using sftp with editing the file /etc/ssh/sshd_config and using internal-sftp, but also doesn't work.


I managed to find the solution to this problem by setting:


and listing the users in vsftpd.chroot_list that CANNOT access the root of the system. Users that are not in this list can still access the root.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.