FTP user outside public_html


Is it possible to create an ftp user with a private folder which is not accesible to the web like /home/user/privatefolder/

is this possible with virtualmin?

If you change their login directory in /etc/passwd (using “vipw”) they should see that folder instead.


Great thank you for your reply.

There is no other way then what you said and blocking Apache for public_html?

Apache access to public_html is defined over in /etc/apache2, not in passwd. The FTP access directory is gotten from passwd. So if you change the user’s home directory (in passwd), then FTP will use that directory, but Apache keeps using public_html.

If you need to “block” Apache from reading public_html, you could create a blank index.htm file or blank index.php file. You could also create an .htaccess file.

Not sure if this covers what you need; feel free to explain your goal and there might be better answers.


Thank you for the help.

I want to use this install of virtualmin as a ftp backup solution.

What I want to do is create an new ftp user and use that ftp account for ftp backup purposes.

I want this account outside of the public folder because the ftp folder is private and will not be shared. And I want to keep the Apache active for letsencrypt.