I would like to change my umask on my Mac. Before Yosemite, I used a file /etc/launchd-user.confand just added a command umask 0077.
The goal is to get the correct permissions for files when saving a file in any GUI program, for example. Finder, Notes, and Firefox. To add umask to /etc/profileor ~/.profile, do not solve the problem.
In Yosemite files /etc/launchd.confand /etc/launchd-user.confare no longer fulfilled. man launchctlHe speaks:
The file / etc / launchd.conf is no longer requested for subcommands to run at an early boot time; this functionality has been removed for security reasons.
I tried another example using LaunchAgents. Which I can set environment variables (for example, ENVIRONMENT_RC), but umask is never set.
/ etc. / environment
#!/bin/sh
umask 0077
launchctl setenv ENVIRONMENT_RC "yes"
/Library/LaunchAgents/environment.user.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>environment.user</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>/etc/environment</string>
</array>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>WatchPaths</key>
<array>
<string>/etc/environment</string>
</array>
</dict>
</plist>
Any ideas on installing umask on OS X Yosemite?
Thanks
Reto
source
share