How do I set the default permission of 775 for all new files and directories in server?

1

I'm trying to set the permission of any new files to 775 by default (inherited from parent folder), so that every user group can edit these files. I have found and followed this tutorial with no success:

http://knackforge.com/blog/vannia/setup-default-group-permissions-new-files-created-under-specific-directory-debianubuntu

It doesn't work. I have to use sudo chmod -Rv 775 . every time to set all the files. How do I make this happen automatically?

Piero

Posted 2013-05-07T14:35:48.673

Reputation:

Regardless of the solution, keep in mind that 755 includes the executable bit for all users; o+rw might be more suitable (o for others, g for group or g+rw,o+rw for both). – None – 2013-05-07T14:37:50.870

ok, but how i can set it to default? – None – 2013-05-07T14:40:03.263

Not an expert, but acls and/or umasks might get you what you need. – None – 2013-05-07T14:42:40.417

I don't suppose the directories you are concerned about are SAMBA dir's are they? you can specify a create mask in your smb.conf to address it. have you considered using the SetGID bit (eg: 2775)? SetGid when applied to a folder, causes objects created in the folder to assume the group value from the folder, including subfolders. I usually have my trees owned by Admin:users, and apply 2750 to the folder. that way all the objects created in the tree become owned by Admin:users automatically, so that my users can read/exec, and my Admin can edit/delete. – Frank Thomas – 2013-05-07T16:11:35.053

No answers