• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing global preferences file into /Library/Preferences (OS X Lion)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing global preferences file into /Library/Preferences (OS X Lion)


  • Subject: Re: Writing global preferences file into /Library/Preferences (OS X Lion)
  • From: Laurent Daudelin <email@hidden>
  • Date: Wed, 20 Jul 2011 19:19:14 -0700

Peter,

/Library/Preferences is indeed set only to root. Applications don't typically save their settings in there. Applications usually save their settings in ~/Library/Preferences (note the "~" meaning the user's home folder).

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
Logiciels Nemesys Software						email@hidden

On Jul 20, 2011, at 18:31, Peter C wrote:

> 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

References: 
 >Writing global preferences file into /Library/Preferences (OS X Lion) (From: Peter C <email@hidden>)

  • Prev by Date: Writing global preferences file into /Library/Preferences (OS X Lion)
  • Next by Date: Re: Writing global preferences file into /Library/Preferences (OS X Lion)
  • Previous by thread: Writing global preferences file into /Library/Preferences (OS X Lion)
  • Next by thread: Re: Writing global preferences file into /Library/Preferences (OS X Lion)
  • Index(es):
    • Date
    • Thread