I have another problem. I created an account for a sub-server. When I logged in I started at the right directory which was /home/topserver/domains/subserver/public_html/ but I can press back and go into all other subservers in domains/ directory and also can access the files in topserver/public_html/. How do I prevent this?
Not sure what going on there, I never touched it either as I don’t use ftp. But I can’t connect sftp on port 22 only ftp. If I use sftp I have to use 2222.
I just notice that a differentt conf file
mine is virtualmin.conf in the proftp directory.
If you create an ftp only account on a sub-server account, it can access all the files of other sub-servers and its top level server. It can also view all the folder names of other top level servers (/home/*) but can’t access the files in them.
Port 22 is ssh, it is a connection to the openssh server. If you want ssh to be jailed, you’d need to use Jailkit jails (and understand the implications), as ssh does not have a jail feature built-in.
Port 2222 is FTP over ssh, it is a connection to ProFTPd. It defaults to using the chroot feature of ProFTPd in a Virtualmin system, as far as I recall. You can configure that.
This worked perfectly Servers > ProFTPD Server > Files and Directories. Change the option of “Limit user to directories” from “None” to “Home directory”. Now ftp user can’t travel up from public_html.
If this is desirable to Virtualmin staff, I would advice that this should be the default option.