SFTP: file symlinks in a jailed (chrooted) directory

Posted by Kevin Duke on Server Fault See other posts from Server Fault or by Kevin Duke
Published on 2012-10-20T02:28:24Z Indexed on 2012/10/20 5:05 UTC
Read the original article Hit count: 516

Filed under:
|
|
|
|

I'm trying to set up sftp so that a few trusted people can access/edit/create some files. I have jailed a user into their home directory (/home/name) but have run into a problem. I want for them to also be able to access other parts of the VPS because it is also a game server, webhost, etc, and I want for them to be able to have full control of files outside their jailed directory.

I tried making a symlink (ln -s) to the desired directory but it does not work, as expected. I tried (cp -rl) to the files that I wanted to give access and it worked -- they can edit the files in their directory and it changes the one stored outside of jail. BUT they cannot create new files (they can but it won't update outside of jail). I know I'm probably not doing this the "right way" but what can I do to do what I want?

© Server Fault or respective owner

Related posts about sftp

Related posts about chroot