Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

1 total

Change the Finder's umask to 077 for new folders


# change the Finder's umask for all user accounts (on Mac OS X)

# cf. http://www.makemacwork.com/secure-finder-permissions.htm
sudo defaults write /Library/Preferences/com.apple.finder umask -int 077     # creates a new preferences file
defaults read /Library/Preferences/com.apple.finder
#defaults delete /Library/Preferences/com.apple.finder umask
ls -l /Library/Preferences/com.apple.finder.plist


# change the Finder's umask for your user account only

defaults write com.apple.finder umask -int 077
defaults read com.apple.finder umask
#defaults delete com.apple.finder umask
ls -lh ~/Library/Preferences/com.apple.finder.plist

# alternative
defaults -currentHost read -g
defaults -currentHost read "Apple Global Domain"
defaults -currentHost write -g umask -int 077
#defaults -currentHost delete -g umask
ls -lh ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist


defaults read -g
defaults read /Library/Preferences/.GlobalPreferences
ls -lh /Library/Preferences/.GlobalPreferences.plist

1 total