Allowing multiple users to create directories over SFTP so the new directories keep the same permissions

0

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.

Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck.

Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

Kszili

Posted 2011-05-15T10:12:52.727

Reputation: 1

puts a sticky on the group permission g+s – None – 2011-05-15T11:39:26.333

Whats does "puts a sticky on the group permission g+s" mean? (I imagine it is the sticky bit). Also, if this is an answer, you should submit it as one. – slotishtype – 2011-07-18T08:55:15.410

Answers

0

Also you can specify different default umask for your SSH server. By default it is 022. You should set it to 002

Here is good explanation how to do it.

Eir Nym

Posted 2011-05-15T10:12:52.727

Reputation: 377

0

I had a very similar problem. I had a ftp server and created a directory-structure. Loggin in via ftp worked for my desired users. But I created that directory-structure with root and so the child-folders belonged to root. That's why users didn't get permissions in that folders (only read).

Check that your folders belong to the right group/user.

wullxz

Posted 2011-05-15T10:12:52.727

Reputation: 2 400