I know this is a bad idea, but I'm not sure how else to do this.

I have an app that needs to set permissions on a lot of files on a USB stick. The obvious way to do this is to write a shell script and then execute it with elevated privileges. This is clearly not a safe way to do it as it could easily be exploited, but is there any better way to do this?

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?

Thanks
_______________________________________________

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