Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

umask can confuse Network Preferences app UNIX

If you use scselect to switch between multiple network locations, be careful not to set your umask to anything more restrictive than 0022. After using scselect to set a new location, I found that my locations disappeared from the Network Preferences dialog in System Preferences, and in the Location menu in the Apple menu.

After a lot of time searching for a cause, I discovered that this is because scselect has overwritten the file /var -> db -> SystemConfiguration -> preferences.xml, and because my umask was set to 0027, the permissions on the file were changed to 640. This prevents Network Preferences from reading the file and displaying the locations.

The fix to this problem is to ensure your umask is set to 0022 or something more permissive before running scselect. I took umask 027 out of my .bash_profile and the problem went away. The default umask is 0022.

Another fix is to run:

$ sudo chmod 644 /var/db/SystemConfiguration/preferences.xml

after running scselect on the command line. This might be the preferred solution if you're on a machine with mulitple users, but I'm inclined to use the first solution because I don't know what else the umask 027 might break.

    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[3,123 views]  

umask can confuse Network Preferences app | 0 comments | Create New Account
Click here to return to the 'umask can confuse Network Preferences app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.