The default umask on Mac OS X systems is 022; I would like it to be 077. In Mac OS X the umask value must be specified in decimal; the octal value 077 is decimal 63. To change the default umask value:
- Log into an administrator account on your computer
- Execute the following line into the Terminal window:
/usr/bin/sudo /usr/bin/defaults write /Library/Preferences/.GlobalPreferences NSUmask 63 - Then execute the following line into the Terminal window:
/usr/bin/sudo /bin/chmod 644 /Library/Preferences/.GlobalPreferences.plist - To return the umask value to the default setting of 022, use the following command:
/usr/bin/sudo /usr/bin/defaults write /Library/Preferences/.GlobalPreferences NSUmask 18
Taken from Securing your computer: Macintosh Quick-Click Guide.