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:


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?

migrated from stackoverflow.com May 7 '13 at 15:45

This question came from our site for professional and enthusiast programmers.

  • 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). – akaIDIOT May 7 '13 at 14:37
  • ok, but how i can set it to default? – Piero May 7 '13 at 14:40
  • Not an expert, but acls and/or umasks might get you what you need. – akaIDIOT May 7 '13 at 14:42
  • 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 May 7 '13 at 16:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.