How to chroot jail a user in ProFTP

terminal.png

Let’s say for example we want to chroot the user someuser to their home directory /home/someuser. You will need to edit /etc/proftpd.conf and add the lines below to the bottom of the file.

DefaultRoot /home/someuser someuser

Let’s quickly explain the line above. DefaultRoot is the parameter used by proftpd to enable the jail functionality. someuser is the primary group of all users being chrooted (by default this is the same as the username). /home/someuser is the directory where the user will be jailed.

Save the file and restart proftp.

sudo /etc/init.d/proftpd stop

sudo /etc/init.d/proftpd start

And you’re all done.

Related Posts

Comments are closed.