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
with previously setting in
/etc/vsftpd.conf
:
local_enable = YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
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.
Asked by Mapl
(111 rep)
Oct 4, 2015, 10:30 AM
Last activity: May 14, 2025, 02:10 PM
Last activity: May 14, 2025, 02:10 PM