0

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
Justin
  • 5,328
  • 19
  • 64
  • 84

1 Answers1

0

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.

Justin
  • 5,328
  • 19
  • 64
  • 84