ProFTPd user start/home folder

Hi guys

I’ve searched all over the place for an answer but can’t seem to get it working.

I have a hosting-like setup where each customer gets a vhost and a folder on the server to contain the website files. That works.

But when I create a new virtual host I would like the top folder accesible to the FTP user to be ${HOME}/htdocs. How is that done?

I’ve tried setting these in the default vhost template:

DefaultRoot ${HOME}/htdocs DefaultChdir ${HOME}/htdocs

But it still starts in just ${HOME} even though I can see that the chdir and DefaultRoot has been set to the right path.

Here is the ProFTPd template I use:

ServerName ${DOM} DefaultRoot ${HOME}/htdocs DefaultChdir ${HOME}/htdocs User ftp Group nogroup UserAlias anonymous ftp DenyAll RequireValidShell off ExtendedLog ${HOME}/logs/ftp.log (In Virtualmin Virtual Servers (GPL) > Server Templates > Default Settings > ProFTPd virtual FTP)

Any help would be greatly appreciated. Also, if you need more info just tell me.


Well, normally you would achieve that by going into Limits and Validation -> FTP Directory Restrictions, enabling a restriction for user home directories.

Then, create a new FTP user by going into Edit Mail and FTP Users -> Add a website FTP access user.

That would create a user whose home directory is your DocumentRoot.

Would that do what you want, or did you really want that to work for the Virtual Server owner?


Yay! That works. Thank you, Eric.

If you don’t mind, I have one other question:

How do I setup ProFTPd and Virtualmin on a server with a shared IP? So that when I add a new virtual host, a matching FTP user is created?

The only thing I’ve been able to get working is the ProFTPd virtual FTP plugin. But it wants a new IP every time I create a new virtual host.


Well, Virtualmin and ProFTPd should work just fine on a shared IP address.

Any user with an account on your server should be able to enter their domain name as the FTP host, and it will connect them to the ProFTPd instance running on your server.

There’s only one user created by default though, that’s the Virtual Server owner. If you want additional users created, you’d have to do that by hand.


Oh, I see.

I just misunderstood the default configuration of ProFTPd.

With your help I got it working. Thank you very much!