How do I use vsftp to jail a user to a subdirectory of their home folder

SurferJoe picture SurferJoe · Jan 16, 2013 · Viewed 10.1k times · Source

How does one configure a user when they login to change root into a subdirectory of their home folder. ie /home/username/files

Answer

Tuim picture Tuim · Jan 16, 2013

Edit

/etc/vsftpd/vsftpd.conf

Add or change:

chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/directory