• 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
Odd question relating to preinstall scripts and administrator access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd question relating to preinstall scripts and administrator access


  • Subject: Odd question relating to preinstall scripts and administrator access
  • From: Cameron Pulsford <email@hidden>
  • Date: Thu, 31 Jul 2008 13:54:10 -0400

So I seem to have the opposite problem most people have... I am installing something that needs administrator access but I need to run a preinstall script that not only doesn't need these rights, it can't have these rights. I need to run a script that does stuff with "launchctl unload" and when that is given root access it defaults to root, even if the explicit path you give it to unload is ~/Library/xxx for example. That's at least what I have gathered after some research.

When I run the script from the terminal it works, but when I run "sudo thescript" it doesn't work.

I tried modifying my script like this...

realUserName=`echo $USER`

sudo -u $realUserName launchctl unlead $HOME/Library/LaunchAgents/ com.racepoint.*.plist

and in the console I still get the same error message "launchctl: Dubious ownership on file (skipping) /Users/xxx/Library/LaunchAgents" and then the installer fails.

Just to test I made a new package that just did some bogus stuff that didn't need administrator access, and I had it run the same prelaunch script and it worked great. Sorry if this is confusing but essentially I need a script to run without super user privileges but the component thats getting installed after the prelaunch script does. Any ideas?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Odd question relating to preinstall scripts and administrator access
      • From: Scott Russell <email@hidden>
    • Re: Odd question relating to preinstall scripts and administrator access
      • From: Scott Russell <email@hidden>
  • Prev by Date: Re: installation with system restart in 10.4, but not in 10.5
  • Next by Date: Re: Odd question relating to preinstall scripts and administrator access
  • Previous by thread: Re: Installing new beta of VServer failed.
  • Next by thread: Re: Odd question relating to preinstall scripts and administrator access
  • Index(es):
    • Date
    • Thread