Writing global preferences file into /Library/Preferences (OS X Lion)
Writing global preferences file into /Library/Preferences (OS X Lion)
- Subject: Writing global preferences file into /Library/Preferences (OS X Lion)
- From: Peter C <email@hidden>
- Date: Thu, 21 Jul 2011 09:31:09 +0800
Hello all,
This is a question that involves 10.7 (Lion). I believe it is allow to discuss about 10.7 at this moment, as 10.7 is release (on sale) to public. List administrator please remove this email if you think it is not allow to discuss this.
Some of the programs I wrote save a preference file into /Library/Preferences via NSDictionary. This serves as a general settings for all users. Many other 3rd party software (Skype, Microsoft and etc) saves preferences file into this directory too. This works from 10.0 to 10.6.
However I notice this has change under OS 10.7. The directory (/Library/Preferences) permission is set to drwxr-xr-x, meaning only root user is accessible to this directory. It is not possible to save any file into this directory anymore. I have check two Macs with clean Lion installations, it is confirm the directory is root user read/write only. Running disk utility does not fix the permission. This will affect many apps written pre-Lion.
I believe the permission is set wrongly but there maybe there is a reason why Apple wants to set it this way. At the moment I have no access to Mac Developer forum, so I can't confirm. I hope some one can enlighten me on this issue.
Assuming OS 10.7 is correct setting /Library/Preferences to root user read/write only, where should I put global Preference file ?
Currently I am thinking of moving/merge the preference file to /User/<name>/Library/Preferences for OS 10.7 but that will be user preference file, not global.
Peter C
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden