Re: Shared file between users
Re: Shared file between users
- Subject: Re: Shared file between users
- From: Jorge Arroyo <email@hidden>
- Date: Sun, 28 Mar 2004 21:27:25 +0200
Thanks,
The folder was ok. Isn't the Shared folder supposed to have these
permissions by default?
Well... a few minutes after sending the email, I found the right
answer to my problem (at least it seems to be the right answer :)
I've manually created the NSData instance with my object and manually
written it to a file using writeToFile:atomically: with this last flag
set to NO, so it writes the file directly instead of creating a new
file and then replacing the old one...
Oh well.... now that I 've made the question to the list, i'd be glad
to know if anybody has had bad experiences trying to save hiscores to
the Shared folder... because I thought it would be the perfect place to
save it...
Thanks,
-Jorge Arroyo
On Mar 28, 2004, at 9:20 PM, Matt Jaffa wrote:
Make sure the folder itself has the right permissions,
I tried the same thing, but it didn't start working till
I made sure the folder /Users/Shared has read/write for
group/owner and everybody else
On Mar 28, 2004, at 12:05 PM, Jorge Arroyo wrote:
Hello,
I'm trying to make a file that can be written by all the users on a
machine. Specifically, I'm creating a file with a hiscore list in the
/Users/Shared folder. I'm using NSArchiver's archiveRootObject:
toFile:
to save the object to the file. Then I use the NSFileManager methods
to
set permissions so that everybody can read and write to that file.
But when I run my program from another user, it cannot write to the
file. It seems, the program is trying to replace the old file with a
new one and only the owner of the file can do that.
So, anyone have a suggestion on how I could maybe just update the
file?
I must be doing something wrong, because I've tested saving a file
with TextEdit, then changing it's permissions so that all the users
can
write to it, and then when I open it from another user's account, I'm
able to modify it and save it...
I'm sorry if this has been discussed, I've been all the afternoon
looking on the net and on the archives, but didn't find a solution...
-Jorge Arroyo
_______________________________________________
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.
_______________________________________________
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.