Linux – How To restrict ftp user in /var/www/html folder only not to others directory

centos6.4ftplinuxsftp

Hope you all are doing fine.

Team I want to strict ftp user only for /var/www/html directory not to other's. Please share your valuable suggestion for that. I have checked lots of Blogs, Forums etc but not succeeded. I can create ftp user but user can go in any directory excluding root .. Please give me answer

Best Answer

It's called a chroot where you change the root of a filesystem for a specific user. Here's a great howto from unix.stackexchange.com

https://unix.stackexchange.com/questions/94603/limit-ftp-access-only-to-the-var-www-with-vsftpd