SFTP jail & Keeping file ownership the same / File owner per folder

Posted by Dragonshadow on Server Fault See other posts from Server Fault or by Dragonshadow
Published on 2011-06-28T23:32:42Z Indexed on 2011/06/29 0:23 UTC
Read the original article Hit count: 596

Filed under:
|
|
|
|

I want to setup a jailed SFTP account for a subfolder of another user's home folder, but want the owner of everything in that subfolder to stay the same, including new files and folders uploaded and created by the sftp user, while still allowing access to the files and folders of that subfolder as if the SFTP user was the parent user.

rawny bawb-sftp /home/rawny <- rawny owns this /home/rawny/sftp <- rawny owns this too, but bawb-sftp can upload to it, edit files, etc

bawb-sftp uploads a file /home/rawny/sftp/lol.txt rawny should still own the file, as if he made it in the first place, even though bawb-sftp was the one that uploaded it.

Basically I guess I'm asking for an sftp jail that acts as a highly limited passthrough/puppet for another user?

© Server Fault or respective owner

Related posts about sftp

Related posts about user