/build/static/layout/Breadcrumb_cap_w.png

LaunchAgent on Mac reports "Dubious ownership on file" error and won't load.

I'm using KBOX to uninstall old versions of Symantec and then install the latest Sym on reboot by using a LaunchAgent. The KBOX agent script downloads the zipped .plist file, unzips it and then moves it to the /Library/LaunchAgents folder on a Mac OS X.6.8 machine.

               /usr/bin/ditto -x -k --rsrc "/Library/Application Support/Dell/KACE/data/scripts/106/com.syminstall.Custom.plist.zip" "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder"

              /bin/mv "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder/com.syminstall.Custom.plist" "/Library/LaunchAgents/"

 

It wouldn't load, giving a "dubious ownership" error so I also asked the script to change the permissions to 664 and the owner to root.

              /bin/chmod 644 "/Library/LaunchAgents/com.syminstall.Custom.plist"

              /bin/chown root "/Library/LaunchAgents/com.syminstall.Custom.plist"

 

On reboot, however, the LaunchAgent still never loads, giving the same error as before. The Console says it gives this error: "launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/com.syminstall.Custom.plist"

 

Anyone have any ideas why it won't load?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
did run into a couple of simular threads and they solved it by putting all the install files in the same folder, it looks like your install shell is in /Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder and the package is in /Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder, try changing your deployment so everything is in one folder thefishyfew Placing it all into one folder has worked. Great idea! Thank you.
Posted by: SMal.tmcc 11 years ago
Red Belt
3

Comments:
  • Those links tell me to change the ownership of the plist file to root and 664. I've asked KBOX to do it in the script but it doesn't do it. Seems to just skip right over it. But, if i go onto the computer and manually change those perms, everything works fine. So, my question is, how to get KBOX to change the perms on that plist file so it will load? - thefishyfew 11 years ago
  • I think you need to use launchd instead of launchagents
    http://superuser.com/questions/36087/how-do-i-run-a-launchd-command-as-root - SMal.tmcc 11 years ago
  • found a partial fix. I can change the perms on the file beforehand, zip it and then move it with the script. The perms hold during the move. The problem now is that KBOX won't load the plist file with the launchctl command. - thefishyfew 11 years ago
  • Could you post your kace script?
    You might also try running the "stop" and "unload" commands before attempting to do the load - SMal.tmcc 11 years ago
  • Also try replacing the launchctl with launchd - SMal.tmcc 11 years ago
  • When I try to use launchd, it gives the following error: This program is not meant to be run directly.

    # The beginning part of the script runs the Symantec Removal tool script.
    # This part is for the plist
    # Unzip file
    /usr/bin/ditto -x -k --rsrc "/Library/Application Support/Dell/KACE/data/scripts/106/com.syminstall.Custom.plist.zip" "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder"

    # Move file that already has permissions set
    /bin/mv "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder/com.syminstall.Custom.plist" "/Library/LaunchAgents/"

    # Load plist
    /bin/launchctl load -F "/Library/LaunchAgents/com.syminstall.Custom.plist"

    # Restart the machine

    ###########################################################
    # This is the script that is supposed to run at load

    #!/bin/bash

    osascript -e 'tell app "Finder" to activate'

    osascript -e 'tell app "Finder" to display dialog "Symantec is installing now. Please wait. Your computer will restart when the install is completed." buttons {"OK"} default button 1 with icon 2'


    /usr/sbin/installer -pkg "/Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder/SymantecEndpointProtection.pkg" -target /

    /bin/launchctl stop com.syminstall.Custom

    /bin/launchctl unload /Library/LaunchAgents/com.syminstall.Custom.plist
    /bin/rm/ "/Library/LaunchDaemons/edu.ecu.InstallSym.plist"

    /bin/rm -rf "/Library/Application Support/Dell/KACE/data/scripts/106/"

    shutdown -r now - thefishyfew 11 years ago
  • This is my plist flie:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.syminstall.Custom.plist</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder/InstallSym.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist> - thefishyfew 11 years ago
  • I am checking with a Apple Genuis, will let you know his input - SMal.tmcc 11 years ago
    • Nothing really looks out of place to me - SMal.tmcc 11 years ago
  • Browse to the 106 folder and is the shell script and pkg file there, Let eliminated a transfer issue that one of the files is missing, you will have to do this as the install starts since it deletes this folder after. - SMal.tmcc 11 years ago
    • Just a side note but KBOX isn't deleting the folder after it runs the script. I had to add an rm command to do that. - thefishyfew 11 years ago
  • They are there. I opened the folder and watched as it downloaded and unzipped the files. - thefishyfew 11 years ago
  • good I have sometimes seen one is missing, this helps eliminate the k1000 is the problem, just the scripting. Sorry I saw the RM and thought kace put it in, good housekeeping! Should hear back this morning, I will ping him when he shows up on my google talk. - SMal.tmcc 11 years ago
  • did run into a couple of simular threads and they solved it by putting all the install files in the same folder, it looks like your install shell is in /Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder and the package is in /Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder, try changing your deployment so everything is in one folder

    Did find a doc on Symantec's site that mentions a silent install fails on 10.7 because java was not already present ,do not know if that is related to your problem. - SMal.tmcc 11 years ago
    • I will try putting all files into one folder tomorrow. This is happening on a X.6.8 machine so hopefully the java isn't an issue. Thanks for looking! ;) - thefishyfew 11 years ago
    • Placing it all into one folder has worked. Great idea! Thank you. - thefishyfew 11 years ago
  • cool, mark this as answered and put the solution in to earn some extra ninja points - SMal.tmcc 11 years ago
Posted by: jknox 11 years ago
Red Belt
2

Are you using the "run as" option in an online script to provide a user that has sudo on the system? If not, that's where I'd start.

Enabling debug and pushing the script again may give you more information as well:

  1. Open Terminal by going to ‘Applications > Utilities.
  2. Go to ‘cd Library/Application\ Support/Dell/KACE/bin’
  3. Execute: sudo ./AMPctl stop (provide your password to execute if it asks for this)
  4. Look for the amp.conf file and open it in TextEdit.
  5. Add ‘debug=true’ (all lowercase) on the last line. Save.
  6. Execute: sudo ./AMPctl start

 The log files can be found here: Library/Application\ Support/Dell/KACE/data

 


Comments:
  • Log files report nothing amiss. I figured that would be the case since its related to the Mac OS and not KBOX this time. As for the "run as" option, its the plist that won't load, not the script so I'm not sure how that will straighten things out. - thefishyfew 11 years ago
  • Update: After the plist file is moved to Library/LaunchAgents, I can manually load it with sudo launchctl load -F "/Library/LaunchAgents/com.syminstall.Custom.plist" and it works fine. So, KBOX isn't able to run the command to load the file for some reason? - thefishyfew 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ