• 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
Running shell scripts as root.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running shell scripts as root.


  • Subject: Running shell scripts as root.
  • From: PCWiz <email@hidden>
  • Date: Sun, 23 Aug 2009 12:31:55 -0600

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@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>
  • Prev by Date: Re: How to interact with Web pages using Cocoa?
  • Next by Date: Re: leak in a sound function
  • Previous by thread: Re: leak in a sound function
  • Next by thread: Re: Running shell scripts as root.
  • Index(es):
    • Date
    • Thread