Linux – How to set individual root folder for every ftp user other than home folder

ftplinuxredhat

Installed vsftpd server in Redhat Linux 5. Where, i want to give the ftp access for my developer other than home directory that is for example /var/www/ directory contains project data.

Here, how can i set the root folder for the every ftp user for accessing the specific project folder assigned to the ftp user in /var/www/ dir?

Best Answer

You can change the home directory of each user to point to the path of his/her project. A command like:

sudo usermod -d /var/www/path/to/project username

will do it. The FTP user after connect will see his/her project if the users are chrooted in the vsftp config.