• 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: Preferences, Authorization, Writing files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preferences, Authorization, Writing files


  • Subject: Re: Preferences, Authorization, Writing files
  • From: Jeff Disher <email@hidden>
  • Date: Thu, 6 Feb 2003 22:14:00 -0500

If you know that the first user to run the preference pane will be in the admin group (you could even make that a requirement of the software) then you can just change the permissions on that particular file the first time it is written to be 777. Take a look at NSFileManager documentation for more on how to do this.

Hope that helps,
Jeff.


On Thursday, February 6, 2003, at 09:38 PM, Frank Fenn wrote:

Hi developers,

I've a problem that bugs me for a while now.

1) a preferences pane in /Library/PreferencePanes, this is for administrators and creates a data file in /Library/Application Support

2) the rights are rwxrwxr-x for /Library and for /Library/Application Support

3) I now use the preferences pane as administrator and the data get saved as for example mypref.data (NSArchiver is used here)

4) If I now log in as a normal user and use the prefs pane I see my save data

5) Now I change some settings and want to overwrite the existing data but this will fail, since a normal user has no write access
to the directories mentioned above. But even with authentication services (which rights shall I obtain?) and an admin user name
password the NSArchive operation failed. What am I doing wrong here?

Thanks for your help and ideas.

--

regards
Frank Fenn - Bright Light Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


Jeff Disher
President and Lead Developer of Spectral Class
Spectral Class: Shedding Light on Innovation
http://www.spectralclass.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Preferences, Authorization, Writing files (From: Frank Fenn <email@hidden>)

  • Prev by Date: getting/setting window properties system-wide?
  • Next by Date: Re: How to catch control-click in table view?
  • Previous by thread: Preferences, Authorization, Writing files
  • Next by thread: Re: Preferences, Authorization, Writing files
  • Index(es):
    • Date
    • Thread