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

Currently my users are chrooted to /srv/www, but I want to give my users access to another directory /Zend/. Is there a way to do this?

I am using Debian 6.

share|improve this question
up vote 5 down vote accepted

Generally speaking, chroot's designed to not let this happen unless you explicitly do something to make one of the directories appear as a true descendant of the other (not with a symlink).

This can be done in various ways on various Unix-likes (for example, with null mounts in FreeBSD). The ProFTPd chroot reference page has a nice summary of doing this on various systems:

Linux (as of the 2.4.0 kernel):
  mount --bind /var/ftp/incoming /home/bob/incoming
  mount --bind /var/ftp/incoming /home/dave/incoming
or, alternatively:
  mount -o bind /var/ftp/incoming /home/bob/incoming
  mount -o bind /var/ftp/incoming /home/dave/incoming
BSD (as of 4.4BSD):
  mount_null /var/ftp/incoming /home/bob/incoming
  mount_null /var/ftp/incoming /home/dave/incoming
  mount -F lofs /var/ftp/incoming /home/bob/incoming
  mount -F lofs /var/ftp/incoming /home/dave/incoming

EDIT: Adding some Debian-specific detail, your mount might be something like:

mount -o bind /true/path/to/Zend /srv/www/Zend

... which would show up as /Zend if your users are chrooted to /srv/www.

share|improve this answer
I have Debian 6 btw. – Doug Dec 11 '11 at 7:12
Debian should support mount -o bind -- see – Royce Williams Dec 11 '11 at 7:56
Today, I learned more about fstab, and mount. Amazing resource link! – Doug Dec 11 '11 at 9:03

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.