add user sftp access to directory

Hi,

I have several users that I want them to be able to read and write the same directory with sftp.

I follow the linode tutorial http://library.linode.com/security/sftp-jails/

And I changed the directory to a new group and I put all users in that group.

Now those users when login with sftp they arrive in that directory and can read everything inside that directory.

But they can't write or upload files…

So I chmod the directory with g+w, so that the group have permissions to write.

The problem is that when I chmod the directory with g+w, the users can't login… When they enter the password the connection is closed…

Any help on this?

Thank you!

1 Reply

That's exactly how it's supposed to work.

You need to create a subdirectory under the read-only login directory, and give them write access to that.

I usually create

/home/user/ <- read only

/home/user/www.example.net <- writable

/home/user/www.example.com <- writable

and so on.

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