Jailed User SFTP - access by other user

I have followed http://library.linode.com/security/sftp-jails/ and jailed users into their own sftp area. It works well.

However, is there a way to allow certain users access other users "jailed areas" through sftp and then create folders, read and write files etc.

An example would be:

I have created a user called "customer-1". I would like different people (including customer-1) to access that space, but I would like to create different user names and passwords for other users (staff members) to use to access the same area.

Hope that makes sense.

3 Replies

Sorry for bumping

Not sure if I was clear here.

Basically I would like to create a jailed user that can access a folder on a different users jail - and nothing else?

Create an empty directory in the originating user's directory, and then use mount to mount the destination directory in the originating directory. This should work even in situations where a symlink wouldn't.

@Guspaz

Thanks I think I understood what you meant, but ..

In fact the symlink seems like a good solution except the permissions do not allow the foreign user to read and write the symlinked folder / files.

Also if I use mount the the originating folder becomes inaccessible to the original owner. (using mount -t).

So here is what I have (bearing in mind that these are sftp jails - except for "myuser".

> myuser@linode:/home$ ls -l

drwxr-xr-x 10 root root 4096 2011-04-27 18:27 user1

drwxr-xr-x 9 myuser myuser 4096 2011-04-11 12:01 myuser

drwxr-xr-x 8 root root 4096 2011-05-10 12:04 user2

drwxr-xr-x 3 root root 4096 2011-05-10 18:28 user3

drwxr-xr-x 4 root root 4096 2011-03-06 10:32 user4

"user1" by definition cannot even see the "user2" directory.

However I would like "user1" to be able to see and download/upload certain specified directories / files belonging to "user2"

Hope that better explains what I am trying to do.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct