Stock FTP with chroot (FreeBSD 7.0)

I was having really weird problems trying to set up a user that would be properly chrooted. Here are some traps/pitfalls.

1) The stock ftpd is not native! It’s merged in from NetBSD (I think). If you look for /usr/share/examples/ftpd/ftpd.conf, you won’t find it.

2) Make sure /home can be executed by anyone. I had everything (“rwx”) disabled for “others”, so that users can’t see who else exists on the system. Well, I had to put the “x” permission back on (in my case, “r” suffices).

3) There might be confusion on what the /etc/ftpXXX files actually do. man ftpchroot says:

The ftpusers file provides user access control for ftpd(8) by defining which users may login.

But if you read further, the file actually defines which users may not login.

Funny thing is, it also says the ftpchroot has the same format; but putting

retard yes

in it caused user retard not to be able to be chrooted upon entering the password. Putting a simple


did the trick.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: