Catalina - LaunchAgents - Load error 5: input/output error
Hi all,
I am having a mysterious problem trying to load a user LaunchAgent under Catalina - It is the .plist of gniemetz's automount.sh
https://github.com/gniemetz/automount
for mounting SMB shares via pwd access from the Keychain -
Placed the .sh into /usr/local/bin, chmod 644 and chown user:staff
Placed the LaunchAgent .plist into ~/Library/LaunchAgents (created LaunchAgents it as it didn't exist), same chmod/chown.
~/Library
drwxr-xr-x 3 users 96 Nov 1 22:13 LaunchAgents
~/Library/LaunchAgents
-rw-r--r-- 1 users 1038 Nov 1 22:13 it.niemetz.automount.plist
/usr/local
drwxr-xr-x 4 root wheel 128 Nov 1 21:52 bin
/usr/local/bin
-rwxr-xr-x 1 root wheel 30310 Oct 29 21:58 automount.sh
then the following:
launchctl load -w ~/Library/LaunchAgents/it.niemetz.automount.plist
Load failed: 5: Input/output error
For the life of me, I cannot find anywhere what this means...
launchctl start ~/Library/LaunchAgents/it.niemetz.automount.plist
completes with no errors, syntax also parses OK
-lint ~/Library/LaunchAgents/it.niemetz.automount.plist
/Users//Library/LaunchAgents/it.niemetz.automount.plist: OK
I have added Terminal and /bin/bash to Full Disk Access under Security...
Launching the script manually as /usr/local/bin/automount.sh works fine.
Console shows
launchctl load:
system.log shows this when load -w is run:
00:27:14 mac-mini com.apple.xpc.launchd[1] (com.apple.xpc.launchd.user.domain.1000002.100006.Aqua): entering bootstrap modeNov 3
00:27:14 mac-mini com.apple.xpc.launchd[1] (com.apple.xpc.launchd.user.domain.1000002.100006.Aqua): exiting bootstrap mode
For easy reference the .plist is pasted at the end -
Anyone seen this error before?
Thanks!
++
<?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>it.niemetz.automount</string>
<key>LimitLoadToSessionType</key>
<string>Aqua</string>
<key>RunAtLoad</key>
<true/>
<key>WatchPaths</key>
<array>
<string>/etc/resolv.conf</string>
<string>/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist</string>
<string>/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/automount.sh</string>
<string>--mountall</string>
</array>
</dict>
</plist>
Mac mini, macOS 10.13