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.

Is it possible to have users on linux, who's home directory is still the default /home/joe but when they login via ssh/sftp, they are chroot at /apps/web/?

Basically I wanted to keep all users files .bashrc, .bash_profile, .ssh in their home /home/joe directory, but they should only have access to /apps/web and further when they login via ssh/sftp.

I am on CentOS 5.6 x86.

Update

I put the following in /etc/ssh/sshd_config but when I try and sftp in with a user in the group deploy it is not working.

Match Group deploy
        ChrootDirectory /apps/web
        AllowTcpForwarding no
        ForceCommand internal-sftp
share|improve this question
add comment

1 Answer

So I got the sftp working with:

Match Group deploy
        ChrootDirectory /apps/web
        AllowTcpForwarding no
        ForceCommand internal-sftp

And the permissions of /apps/web need to be user and group owned by root.

share|improve this answer
    
what are your directory permissions on /apps/web? (ls -la) –  gravyface Sep 7 '11 at 20:58
add comment

Your Answer

 
discard

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.