Friday, June 03, 2005

How to create a ftp only + chroot in FreeBSD

1. If the system doesn't have an nologin alike shell, create one: (just a simple shell script)


#!/bin/sh
exit 0


save it to /usr/bin/ftponlyshell (or wherever you want)

Important! Add this file to /etc/shells

2. Create the user as usual, using the above as shell
3. Add the user to /etc/ftpchroot

you're done.

No comments: