Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
Perfect, thank you! For some users new to Centos: open the file /etc/passwd to change the homedirectory of a user! –  paskster Nov 17 '10 at 16:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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