3

I have a CentOS 6.9 file server set up. Everyone in the company is given access as a member of the staff group. They're dropped into /home/sharedfolder when they connect, however they're able to jump up to the /home directory and view subdirectories and contents.

How can I lock them into /home/sharedfolder while allowing them full read/write access to all subdirectories there?

/etc/ssh/sshd_config:

Subsystem      sftp    internal-sftp
Match Group staff
    ChrootDirectory /home/sharedfolder
    GSSAPIAuthentication no
    AllowTCPForwarding no
    AllowAgentForwarding no
    X11Forwarding no
    ForceCommand internal-sftp -l VERBOSE

/etc/passwd:

steve:x:2501:2501:Steve Stephens:/home/sharedfolder:/sbin/nologin
kimberly:x:2502:2502:Kimberly Kimboa:/home/sharedfolder:/sbin/nologin
mike:x:2503:2503:Mike Michaels:/home/sharedfolder:/sbin/nologin

/etc/group:

staff:x:2500:steve,kimberly,mike

Permissions

#ls -l /
drwxr-xr-x.  33 root root   4096 Jan 24 14:00 home

#ls -l /home
drwxr-xr-x. 123 root        root         4096 Feb 21 09:41 sharedfolder

#ls -l /home/sharedfolder
drwxrwxr-x. 3 steve        staff         4096 Feb 21 09:41 files1
drwxrwxr-x. 5 kimberly        staff         4096 Feb 18 12:57 files2
drwxrwxr-x. 2 mike        staff         4096 Feb 12 15:03 files3
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Gray Loon
  • 41
  • 1

0 Answers0