On 2009 Aug 23, at 11:57, I. Savant wrote:

On Aug 23, 2009, at 2:31 PM, PCWiz wrote:

Basically I need to run the chown/chmod utilities and probably cp/ mv/mkdir as well using root privileges. What would be the best way to do this?

 http://developer.apple.com/referencelibrary/GettingStarted/GS_Security/

Pay particular attention to anything regarding "Authorization Services".

Yes, you'll need a privileged helper tool. We had a discussion of this over on [email protected] a couple months ago and I was convinced that it made more sense to temporarily chmod them and then cp/mv/mkdir/whatever. [1] Anyhow, I added two new tools, HelperToolTaskDoSetPermissions and HelperToolTaskDoCopyFiles, to my BetterAuthorizationSample wrapper. [2] Even if you can use my tool and framework it's still quite messy, though -- privileges have a high price.

A better place to discuss this further would be [email protected] .

Jerry

1.  http://lists.apple.com/archives/Apple-cdsa/2009/May/msg00002.html
2. http://sheepsystems.com/sourceCode/authTasksCocoa.html Note: The new tools, HelperToolTaskDoCopyFiles and HelperToolTaskDoCopyFiles, are not demonstrated in the demo app.


_______________________________________________

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]

Reply via email to