You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Setting global umask via NSUmask or /etc/launchd.conf and /etc/launchd-user.conf broken?

The procedure to change the default global umask from 0022 to 0002, so that most files created by one user on a machine will be read-write by other users in the same group, seems to have been broken or to have been changed in OS X Lion from OS X Snow Leopard. What worked as far back as OS X 10.4 and was officially documented was done from Terminal: "defaults write /Library/Preferences/.GlobalPreferences NSUmask 2" (with a sudo, if not logged in as 'root').


Another way documented in various places and which I actually used through OS X 10.6 was also done via Terminal. Two files were created: /etc/launchd.conf (for system-wide global umask) or /etc/launchd-user.conf (for user-specific global umask). The contents of each were simply the single umask command, "umask 002" or ("umask u=rwx,g=rwx,o=rx", I can't remember which variant I used - they're functionally the same, though).


No matter which method I use, the 2nd or the 1st, the global umask no longer changes.


Does anyone know whether this has been deliberately hobbled under OS X Lion, requiring purchase of OS X Lion Server? Is this an OS X Lion bug? Or, am I looking at something wrong?

MacBook Pro, Mac OS X (10.7)

Posted on Jul 23, 2011 5:38 PM

Reply
10 replies

Aug 15, 2011 7:08 AM in response to Clement B. Edgar III

See this support article, which was written for OS X Server, but seems applicable to Mac OS X client versions as well:

Mac OS X Server v10.5, 10.6: Setting a custom umask


The excerpt below describes the use of /etc/launchd-user.conf, and strongly cautions against using /etc/launchd.conf.


---------

Umask for user applications


In Mac OS X v10.5.3 and later, you can create the file /etc/launchd-user.conf with the contents "umask nnn". Do not include the quotation marks and replace nnn with the desired umask value, such as 027 or 002.


This will set the user's umask for all applications they launch, such as Finder, TextEdit, or Final Cut Pro, and control the permissions set on new files created by any of these applications.

.........


Umask for system processes


In Mac OS X v10.4 and later, create the file /etc/launchd.conf with the contents "umask nnn". Do not include the quotation marks and replace nnn with the desired umask value, such as 027 or 002.


This will set the umask for all processes. Changing this value is strongly discouraged because it changes the permissions on files used by the system software. If the permissions are too restrictive, dependent software may not work. If the permissions are too open, they may introduce security issues.

------------------------------------

Oct 20, 2011 11:59 PM in response to jsd2

Hi, I'm trying to change the global umask in Lion but I still have some problems, I alrady try every procedure that I found on the web


1) add a umask specification in files "/etc/launchd".conf" and "etc/launchd-user.conf"

2) add a umask record in "/Library/Preferences/com.apple.finder.plist" and "~/Library/Preferences/com.apple.finder.plist"


Now as Watercool said in his post everything is ok when I create folder from terminal but still doesn't working when I create folders or files from Finder.


Any suggestions?


(I want to put umask = 002, I'm running Mac Os X Lion 10.7.1 on a MacBook 4,1 late 2008)

Nov 4, 2011 7:32 PM in response to cpr2011

Hi,

I'm having the same problem during testing when I Creating New Folders using Finder, the New Folder are only Read Only to Everyone. Even if the umask 000 setting file is in place etc/launchd-user.conf. the New Folder still has the wrong permissions. But if you use Terminal to create a New Folder à mkdir à Test Folder Permissions are Read & Write and are OK. So it would appear that we may have a Finder problem since Terminal seems to works ok! But I'm sure Apple is aware of the problem.

Setting global umask via NSUmask or /etc/launchd.conf and /etc/launchd-user.conf broken?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.