1

Possible Duplicate:
set up a chrooted SFTP login with OpenSSH

I am not familiar with chroot jails so please forgive my ignorance.

From my understanding you would normally chroot a user to their home directory - ex: /home/username.

I would like to chroot all (or ideally a specific group of users) to a certain directory.

For example a user should be able to get to /web/TheirUserDir and /web/GroupDirThatAreIn - basically I would like to make it so the group "webusers" can not go about /web.

Thanks in advance for ideas, thoughts and answers.

2
  • What software are you using to server out SFTP? Sep 7, 2011 at 21:46
  • I am using OpenSSH SFTP
    – ckliborn
    Sep 7, 2011 at 22:48

1 Answer 1

1

What you are asking for is not possible using (only) chroot, as /web/userDir and /web/groupDir share /web as their lowest common root.

Forcing them to use sftp and limiting them to /web is as close as you can get:

Match group webusers
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /web

The rest can (and should) be handled by ACLs.

Not the answer you're looking for? Browse other questions tagged .