Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

marked as duplicate by mailq, Zoredache, Scott Pack, voretaq7 Jul 28 '12 at 4:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What software are you using to server out SFTP? –  Justin Pearce Sep 7 '11 at 21:46
    
I am using OpenSSH SFTP –  ckliborn Sep 7 '11 at 22:48

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

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