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
local_enable = YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list
and add the username to
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.