OpenSSH SFTP: chrooted user with access to other chrooted users' files
- by HannesFostie
Decided to re-phrase the question entirely in order to not have to make a new one.
I currently have an SFTP server set up using OpenSSH's SFTP functionality. All my users are chrooted, and everything works.
What I need most right now is for one user, which is not root (because this user can't have any real SSH powers!), to have access to all other users' chrooted dirs. This user's job is to fetch all uploaded documents every once in a while.
Directory structure as of now is:
/home
|_ /home/user1
|_ /home/user2
|_ /home/user3
With ChrootDirectory set as /home/%u
User "adminuser" should have access to user1, user2 and user3's directories without having access to /home or at the very least not to anything but /home.
Bonus points for the one who can tell me how to let users write inside /home/%u without having to make a new directory inside that dir which they own themselves, and not root as is the case with /home/%u (openssh chroot prerequisite).