From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [SYSADMIN/OSX] Changing the global umask (eg. for the Finder,
   Date: Tue, 18 Apr 2006 18:23:48 -0400
Msg# 1273
View Complete Thread (7 articles) | All Threads
Last Next
Greg Ercolano wrote:
OSX: HOW TO CHANGE THE GLOBAL UMASK FOR ALL USERS TO 002
--------------------------------------------------------

DESCRIPTION
    The 'umask' is what sets the default read/write
    permissions for files and folders created by users under
    unix.. this includes OSX.

    Under OSX, it's been a strange issue because the
    umask seems to be at a default of 022 (rw-r--r--) for all guis,
[..]

SOLUTION
    1) Edit the file /Library/Preferences/.GlobalPreferences.plist

    2) Add the lines:
        <key>NSUmask</key>
        <integer>2</integer>

10.4.x UPDATE
-------------

        Following up to this thread on how to adjust the global umask
        on a Mac OSX machine.

	It would appear in 10.4 they started making binary versions of the
	XML files, and in some cases I've seen the umask value already set
	inside the file.

        So to set the global umask in 10.4.x, use these steps:

                1) Edit the /Library/Preferences/.GlobalPreferences.plist file.
                   If it's in binary format, quit the editor without saving,
                   then run this:

                            plutil -convert xml1 /Library/Preferences/.GlobalPreferences.plist

                   ..that will convert the file into an ascii file. (You might want to
                   save the old file, just in case). See 'man plutil' for more info.

                2) Search for an existing "NSUmask" and change the <string>002</string>
                   value to <string>000</string>, eg:

                   BEFORE:
                                <key>NSUmask</key>
                                <string>002</string>

                   AFTER:
                                <key>NSUmask</key>
                                <string>000</string>

                   If the above two lines don't already exist, add them within the outer <dict>
                   section of the file.

	This should affect all users on the machine that change is made to.

	You may also want to check if the user's own .GlobalPreferences.plist file
	in their home directory (eg. /Users/fred/Library/Preferences/.GlobalPreferences.plist)
	doesn't have any settings that might override this value.

Last Next