Centos – vsftp give user only access to a certain folder

centosftpuser-managementusersvsftpd

I use CentOS 5.5 and I installed vsftp.
I created a user "myUser" and every time I use Filezilla and log with this user I get directed to the users home-folder, but still have access to pretty much all folders.

I want to give the user only access to /var/www/myWebapp, because this user should only be able to update the files that are used by my website. How do I do this?

Best Answer

Change the home directory of the user to the WEBROOT folder and...

Open vsftpd configuration file - /etc/vsftpd/vsftpd.conf

# vi /etc/vsftpd/vsftpd.conf

Make sure following line exists (and uncommented):

chroot_local_user=YES

Save and close the file. Restart vsftpd.

# /etc/init.d/vsftpd restart

Hope this Helps :D