Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
puts a sticky on the group permission g+s –  user81353 May 15 '11 at 11:39
    
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 Jul 18 '11 at 8:55

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.