I have an app I install with PackageMaker setting the permissions on the
staging dirs to root/admin as mentioned in the Apple docs so that the app gets
installed with permissions for any user.
I also install an empty dir with full rwxrwxrwx permissions - this is a data
dir that my app will use to write files to at runtime.
So far, so good. Everything works.
In my app I then write a file to that data dir like this:
BOOL flushed = NO;
flushed = [ NSKeyedArchiver archiveRootObject:self
toFile:@"/datadir/datafile.dat" ];
Problem is, when this line completes, the permissions on the data dir have
changed to the current user/wheel and non-writable for all other users:
drwxr-xr-x@
And the permissions on the data file itself are set to the current user/wheel
and:
-rw-r--r--@
Why does archiveRootObject:toFile: change the permissions on the parent
directory? I didn't ask it to. This dir has to be writable for all users - the
way I installed it - not by only the current user.
How can I avoid having the permissions changed?
Thanks,
Erg
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]