• 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
/Library/Preferences Writable By Everyone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/Library/Preferences Writable By Everyone


  • Subject: /Library/Preferences Writable By Everyone
  • From: "Ken J." <email@hidden>
  • Date: Sun, 20 Sep 2009 03:00:27 -0700

Hello all, this is a question regarding to the permission set on
/Library/Preferences in Leopard.

I ran this code as a non-admin user: (I am strict to myself to not use
admin accounts other then installs/updates.)
	CFPreferencesSetValue(keyName, valueString, appID,
						  kCFPreferencesAnyUser, kCFPreferencesCurrentHost);
	BOOL success = CFPreferencesSynchronize(appID,
											kCFPreferencesAnyUser,
											kCFPreferencesCurrentHost);
	if (success) NSLog(@"Preferences synchronized.");

The result:
2009-09-20 02:11:16.002 aups[1945:10b] Preferences synchronized.

What I was trying to do was to save a global parameter for my app that
is only modifiable by Admin rights. However, this was just a
proof-of-concept process and have not ran any code as Admin just yet.

I did a lot of research and was confident that this would NOT write
the plist file since it requires an Admin-user for an AnyUser domain.
But it is now in the /Library/Preferences as "com.example.test.plist"
and is the case with all the non-admin account I tried on my Leopard
iMac.
So I checked the folder permission to find out it's:
drwxrwxrwx   67 root     admin  2278 Sep 20 02:35 Preferences

I ran repair permissions but that did not change anything.
Can anyone confirm this is in fact the default permission and the
CFPreferences utilities behave such?
Or is this a known bug?

Thanks.

--
Ken
_______________________________________________

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

  • Follow-Ups:
    • Re: /Library/Preferences Writable By Everyone
      • From: Jeff Johnson <email@hidden>
    • Re: /Library/Preferences Writable By Everyone
      • From: Alastair Houghton <email@hidden>
    • Re: /Library/Preferences Writable By Everyone
      • From: "Glenn L. Austin" <email@hidden>
  • Prev by Date: Class for external monitor?
  • Next by Date: Architecture for concurrent network client
  • Previous by thread: Re: Class for external monitor?
  • Next by thread: Re: /Library/Preferences Writable By Everyone
  • Index(es):
    • Date
    • Thread