• 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: Greg Guerin <email@hidden>
  • Date: Thu, 21 Jul 2011 13:23:32 -0700

Peter C wrote:

Graham, I used to store serial number codes for all users, in this directory.

Looks like I have change it to save it user library directory.


The /Users/Shared/ directory is public-writable, with sticky-bit set (unless that changed in Lion, too). See 'man sticky' for an explanation of the sticky-bit. See the sample code CFPrefTopScores for example code.

The convention is to create a sub-directory there, not write files directly into /Users/Shared/. If you put a globally readable file there, and you want any user to be able to modify it, be sure to apply the correct permissions to the sub-dir and to the prefs file itself.

  -- GG

_______________________________________________

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


  • Prev by Date: Re: Windows get released on 10.6, leak on 10.7
  • Next by Date: Re: problem with dataWithContentsOfFile on Lion
  • Previous by thread: Re: Can keypaths contain array indexes?
  • Next by thread: CGEventRef with function key
  • Index(es):
    • Date
    • Thread