I have a directory of subdirectory and files, with the files' permissions set at 0664.

The directory and subdirectories are set at 2775, so all new files made have the same group set as the directory.

New files made in the directories have permissions set to 0644.

Is there anything that can be done to make new files have the permissions set to 0664 instead, in a similar fashion to using setgid for the group owner of the files?

umask 002

Files (and directories) after this will be created with 0664 permissions.

| improve this answer | |
  • 1
    @paradroid the global default for shells is usually set in /etc/profile. – jordanm Aug 8 '15 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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