LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How can I restrict FTP users to specific folders on the server (CentOS 6.0) (https://www.linuxquestions.org/questions/red-hat-31/how-can-i-restrict-ftp-users-to-specific-folders-on-the-server-centos-6-0-a-943185/)

redhat19 05-03-2012 09:16 PM

How can I restrict FTP users to specific folders on the server (CentOS 6.0)
 
Hi all,

I have centOS 6 installed on our VPS server.
I have successfully installed FTP and created an FTP user.
However, the FTP user can view all the files on the server.
How can I restrict the FTP user to a certain directory?
Currently, the user is sent straight to var/www/html (but this FTP user is still able to view the other files on the server)

I had have created virtual hosts on the server and this FTP user should actually go to its corresponding website's home on the server, which is:
/var/www/vhosts/mywebsite.com/httpdocs
and this user should not be able to view the other files…
How can I achieve this?

Here’s how I got to this point:
I had added the user by doing: useradd -d /var/www/vhosts/mywebsite.com/httpdocs myftpuser
And then created and added myftpuser to /etc/vsftpd/chroot_list

Thanks.

blue_print 05-03-2012 10:44 PM

Which FTP server you're running. Probably the following link will help you,

http://www.cyberciti.biz/tips/rhel-f...tallation.html


All times are GMT -5. The time now is 12:57 PM.