sftp jail works until I add a second user

I created the group sftp, created usera, made a folder owned by root:root with permission 0755 a sub folder owned by usera:sftp and I can SFTP into the folder :)

I then created userb added it to the group sftp, made a folder owned by root:root with permission 0755 a sub folder owned by userb:sftp and I cannot SFTP into the folder :(

help!!!

2 Replies

Set LogLevel to DEBUG in /etc/ssh/sshd_config, restart ssh then try connecting again it'll log why you can't connect in /var/log/syslog or /var/log/auth.log (or perhaps somewhere else in /var/log depending on your disto)

Very helpful thanks! What I had failed to understand is that the home folder for the user need to belong to root:root with the folder you want the user to be able to put files in to be a sub folder of the folder owned by the user.

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