Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu Server 9.10 with ProFTP and Webmin.

I have things set up such that when the FTP user logs in, the user goes to /var/www/[domain]. The trouble is that I don't want them to see the /var/www part, just the [domain] part. Is there a way to do that?

share|improve this question
up vote 3 down vote accepted

You can use the setting DefaultRoot to chroot a group to the /var/www/[domain] directory.

For example, this will chroot the group group1 to

DefaultRoot /var/www/ group1

Add to proftpd.conf and restart ftpd. The parameter after the path accepts boolean input.

share|improve this answer
Unfortunately this didn't work. When using FireFTP, I still see the /var/www in the path. Perhaps this is a bash thing where I can chroot from a file in there? – ServerChecker May 24 '10 at 22:44
Do you run the version of ProFTPD that supports it? – Warner May 24 '10 at 22:45
Well blow me down. It works now! I must have needed to restart again, or use /bin/rbash -- I did one of those two changes and all is well. – ServerChecker May 24 '10 at 22:47
On the /bin/rbash, I edited the user accounts used for FTP and made certain their shell was /bin/rbash instead of /bin/sh or /bin/bash. Don't know if that was necessary, but that's what I did and then restarted ProFTPD. – ServerChecker May 24 '10 at 22:49
You might consider using /bin/false or nologin instead unless the user actually needs shell access. – Warner May 24 '10 at 22:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.