0

Lazy Mans Guide to Chroot Jailed FTP

Posted (Updated ) in Linux

Setting up chroot jailed FTP access on linux (especially Debian-based distros) is remarkably easy. All you’ll need is proftpd:

sudo apt-get install proftpd

Install as standalone (the default option) and once complete, make sure /bin/false is in your shells list – if not, add it:

sudo nano /etc/shells

Set up the FTP account with desired chroot:

sudo useradd <user> -p <password> -d /path/to/chroot -s /bin/false

Re-set the new accounts password (don’t ask me why):

sudo passwd <user>

By this point you’ll have a working FTP account but no chroot. Let’s add that now. In /etc/proftpd/proftpd.conf make sure the following is uncommented:

DefaultRoot			~

Restart proftpd service and you’re good to go:

sudo service proftpd restart

Thanks to frodon of the Ubuntu Forums for his tutorial found here.