Feel free to shake your head at me. (embarrassed )
I was succesful in creating a pkg that installs dockutil, installs my scripts and plist in the correct location.
When I run the command launchctl load -wF "/Library/LaunchAgents/.plist i get a "Path had bad ownership/permissions" If I give everyone read access to /Library/ the LaunchAgent plist runs. I can use LaunchControl but that just tells me that the plist is not loaded.
My question is what other directory do I need to change permissions on to get the plist to run.
I have to mention that this was all working until I had to change something in my original script and promptly broke the whole thing.
All launchd job plists, both LaunchDaemons and LaunchAgents, need to have the following permissions:
POSIX 644 (that's owner read/write, group read only, everyone read only)
You can set both of these on the plist from the command line of course.
sudo chown root:wheel /Library/LaunchAgents/<plist name> sudo chmod 644 /Library/LaunchAgents/<plist name>
As long as the plist is correctly formed and you set those permissions, it should run, barring any issues with the Program Arguments section. But it sounds like its just not loading at all, which typically boils down to permissions being off.