• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running shell scripts as root.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running shell scripts as root.


  • Subject: Re: Running shell scripts as root.
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 23 Aug 2009 14:33:12 -0700


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@hidden 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@hidden .

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@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


  • Follow-Ups:
    • Re: Running shell scripts as root.
      • From: "I. Savant" <email@hidden>
References: 
 >Running shell scripts as root. (From: PCWiz <email@hidden>)
 >Re: Running shell scripts as root. (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Confusion over erratic behavior in Xcode debugging
  • Next by Date: Re: Running shell scripts as root.
  • Previous by thread: Re: Running shell scripts as root.
  • Next by thread: Re: Running shell scripts as root.
  • Index(es):
    • Date
    • Thread