Ftp – Restrict listing a “root” directory in ProFTPD

ftp

I have an FTP server set up where, off the root, there is a file structure laid out by city. Underneath each city's folder are more folders organized by project. I would like to be able to restrict my guest users (using a specific login/password) in such a way that they are unable to view the folders under the city name, but instead have be brought directly to them via an FTP link.

Example:

/
–City1
—-Project1
—-Project2
—-Project3
–City2
—-Project4
–City3
—-Project5

link: ftp://ftp.company.com/City2/Project4

Best Answer

To do this, when you create the user you set their home directory to be for example /City2/Project4. You also configure the proftpd DefaultRoot directive in proftpd.conf to lock the user to their home directory.

DefaultRoot ~