Re: Detecting system protected folders.
Re: Detecting system protected folders.
- Subject: Re: Detecting system protected folders.
- From: Greg Guerin <email@hidden>
- Date: Fri, 18 Dec 2009 13:25:11 -0700
Sandro Noël wrote:
it does not work, even if i select the root folder of my hard drive
i still get the permission to rename it.
What effective user id is it running as? What groups is that user id
a member of?
Run this Terminal command to identify the user: id -p
Run this Terminal command to examine permissions: ls -ld /
If / is writable by the identified user, then it's working
correctly. That may not be what you want or expect, but it's correct
for the code you've shown.
If the code isn't doing what you want, then please explain more
precisely what you want to happen. Give examples.
There are very few things that are "system protected" in any way
other than by Posix permissions or ACLs. I'm almost certain that
NSFileManager is using nothing but those to determine writability.
My guess is that it's using the system call access(2); read 'man
access'.
-- GG_______________________________________________
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