Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > /Library/Application Support permissions

/Library/Application Support permissions
Thread Tools
disco_stu
Junior Member
Join Date: Jun 2002
Location: Springfield
Status: Offline
Reply With Quote
Jan 12, 2004, 03:56 PM
 
I'm working on a game in Cocoa that saves the high scores in /Library/Application Support/MyGame/Scores.plist so that they are accessible to every user on the machine. AFAIK, this is exactly where Apple suggests you put these types of resources.

Basically my code checks to see if the directory MyGame is in the /Library/Application Support directory, and creates it if it isn't.

My code works perfectly in my account (because I'm an admin), but I cannot create the folder if I'm in any other (ie, non-admin) account on the machine. It's because I have Read/Write access to the Application Support directory, but everyone else has Read only, and so they cannot create this folder.

What are my options?

Thanks in advance
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jan 12, 2004, 05:31 PM
 
Obviously, you could ask for a password in order to create systemwide high scores and just chmod your directory to be 777 so you can write to it from then on. Or, alternatively, you could put it in the /Users/Shared folder.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
disco_stu  (op)
Junior Member
Join Date: Jun 2002
Location: Springfield
Status: Offline
Reply With Quote
Jan 12, 2004, 06:16 PM
 
Originally posted by Chuckit:
Obviously, you could ask for a password in order to create systemwide high scores and just chmod your directory to be 777 so you can write to it from then on. Or, alternatively, you could put it in the /Users/Shared folder.
Thanks for the ideas. It's a really simple game, so it doesn't seem worth it to me to require Administrator privileges just to be able to save the high scores.

I didn't think of /Users/Shared/ - I guess that's an option. Weird, I guess I just thought that this sort of stuff was intended to go in the Application Support directory, but what good is it if only certain people can access it?


Again, thx for the ideas ChuckIt.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:03 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,