Restrict Users and Owners to their home directory

OS type and version Ubuntu 22.04.4
Virtualmin version 7.10.0

I’ve been testing and I can’t make Users and Server Owners only able to see their home directory when using FTP.

I’ve the Chroot users on the Server Template and the ProFTPd configured to everyhome only home directory… not working still.

EDIT: It works, I had to restart the server, something got stuck.

FTP is not related to the chroot jail option in Server Templates. Don’t confuse the two concepts. FTP users do not have a shell, and they interact with the system via the FTP server.

For ProFTPd this is a single configuration option.

We set this in /etc/proftpd/conf.d/virtualmin.conf:

# chroot users into their home by default
DefaultRoot ~

If you have configured ProFTPd in such a way that it no longer loads files in /etc/proftpd/conf.d or if you have overridden the DefaultRoot option in some way that breaks this behavior, then that would be the problem.

If your users are connecting to port 22, they are talking to the ssh server, which does have a shell, and thus the only way to restrict them is to put the user in a chroot jail, which is quite complicated.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.