Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: How to set NSUmask in Leopard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: How to set NSUmask in Leopard
Authored by: chymb on Jun 12, '08 05:18:43AM
In 10.5.3 you can set the umask in /etc/launchd-user.conf so that it only applies to user processes (those whose Parent's Process ID is not 1).
This means admin users will also have the same umask.
Here's the source change

[ Reply to This | # ]
10.5: How to set NSUmask in Leopard
Authored by: xr4ti on Jul 22, '08 07:14:59PM
A billion thanks for finding this, chymb. And curses to Apple for their poor handling of it. I did a wipe and re-install after experimenting with other techniques.

I can confirm that putting a umask 077 in /etc/launchd-user.conf does, in fact, set the umask for users, including the admin user (although it didn't work for the admin the very first time I logged in as the admin).

It applies to terminal shells and the Finder (at least to the creation of folders by the Finder).

I can also caution AGAINST using the global setting in /etc/launchd.conf (mentioned earlier). Setting the global umask with /etc/launchd.conf does, in fact, cause increasingly odd behaviors.

One example: Apple has chosen to link /etc/resolv.conf (a nice simple flat file) to a dynamically set file /var/run/resolv.conf. If you cycle your network using a GUI tool (such as the Location pull-down in the Apple menu), the resulting /var/run/resolv.conf will not be readable by anyone but root. nslookup, dig, and their equivalent in the Network Utility.app will no longer be able to resolve ip addresses.

Now that they've added (but not documented) /etc/launchd-user.conf, I recommend avoiding a umask change in /etc/launchd.conf.

[ Reply to This | # ]