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: elmimmo on Jun 04, '08 12:31:43AM

Apple's newly updated PDF guide titled Mac OS X: Security Configuration For Version 10.5 Leopard does mention the global variable NSUmask as a way to change the globally defined umask setting

Anyone dare to try and report on 10.5.3?

Quoted from pages 128-129:

Chapter 7 Securing Data and Using Encryption

Setting Global File Permissions

Every file or folder has POSIX permissions associated with it. When you create a file or folder, the umask setting determines these POSIX permissions.

The umask value is subtracted from the maximum permissions value (777) to determine the default permission value of a newly created file or folder. For example, a umask of 022 results in a default permission of 755.

The default umask setting 022 (in octal) removes group and other write permissions. Group members and other users can read and run these files or folders. Changing the umask setting to 027 enables group members to read files and folders and prevents others from accessing the files and folders. If you want to be the only user to access your files and folders, set the umask setting to 077.

To change the globally defined umask setting, change the NSUmask setting.

You must be logged in as a user who can use sudo to perform these operations and you must use the decimal equivalent, not an octal number.

Not all applications recognize the NSUmask setting so files and folders created by other applications might not have proper umask settings. The NSUmask setting also doesnít affect some command-line tools.

WARNING: Many installations depend on the default umask setting. There can be unintended and possibly severe consequences to changing it. Instead, use inherited permissions, which are applied by setting permissions on a folder. All files contained that folder will inherit the permissions of that folder.

To change the global umask file permission:

  1. Sign in as a user who can use sudo.

  2. Open Terminal.

  3. Change the NSUmask setting to be the decimal equivalent of the umask setting:

    $ sudo defaults write /Library/Preferences/.GlobalPreferences NSUmask 23

    Use the decimal equivalent, not a hexadecimal number.

    This example sets the global umask setting to 027, which has the decimal equivalent of 23. Replace 23 with the decimal equivalent of your umask setting.

    Important: Make sure the path you enter is .GlobalPreferencesónot .GlobalPreferences.plist, which might be accidentally added by Terminalís autocompletion feature.

  4. Log out.

Changes to umask settings take effect at the next login.

Users can use the Finderís Get Info window or the chmod command-line tool to change permissions for files and folders.



[ Reply to This | # ]