How to configure ProFTPD to chroot users to /home
directory or any other selected directory
If you're using
ProFTPD user on a Linux server you most
certainly has wondered how you can configure the
FTP server
to chroot (or jail) it's users to a particular directory of
choice.
By the default the behaviour of ProFPTD is not to use any
chrooting, I believe because chrooting is not yet a mass well
accepted standard, so you will have to do a minor modifications to
proftpd.conf file.
Actually it's a way easier than it sounds to configure the ProFTPD
to chroot / jail it's users.
To configure ProFTPD to chroot it's users to the
/home
directory all you have to do is edit your
proftpd.conf
On Debian Linux and many other Linux distributions the proftpd.conf
is located in
/etc/proftpd/proftpd.conf
root@linux-server:~# vim
/etc/proftpd/proftpd.conf
Therein uncomment the line
# DefaultRoot ~
to read
DefaultRoot ~
If you further need to chroot proftpd users to be jailed to let's
say their
public_html file for security reasons you can just
change the up-mentioned proftpd
DocumentRoot directive
to:
DefaultRoot ~/public_html
Hopefully partaking this steps will be a step further to make your
Linux server a bit more secure.