0

I'm on Mac Ventura 13.1, I moved my home dir to an external drive as the internal SSD is unusably small (256GB). I followed this guide: https://www.lifewire.com/move-macs-home-folder-new-location-2260157

Everything appears to be working correctly except for services. When I try to start I see this:

$ echo $HOME
/Volumes/Data/home/hackeron
$ /bin/launchctl bootstrap gui/501 /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.

When I try to run as root I see:

$ sudo /bin/launchctl bootstrap gui/501 /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist

/Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist: Path had bad ownership/permissions
Bootstrap failed: 122: Path had bad ownership/permissions

But the path ownership/permissions appear correct:

$ ls -ltra /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist
-rw-r--r--@ 1 hackeron  staff  726 23 Dec 11:02 /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist
$ /bin/ls -ltra /Volumes/Data/home/hackeron/Library | grep LaunchAg
drwxr-xr-x   11 hackeron  staff    352 23 Dec 11:05 LaunchAgents
$ ls -ltra /Volumes/Data/home/hackeron | grep Library
drwx------@ 97 hackeron  staff       3104 21 Dec 20:52 Library

I also tried to chmod 600 the service file but the results are the same.

This happens with all service files in the home directory, not just memcached. Running the mamcache command manually starts memcache without issues, so it is not an issue with the service/executable (it was also working before moving the home directory):

$ /opt/homebrew/opt/memcached/bin/memcached -l localhost

I also found this in /var/log/com.apple.xpc.launchd/launchd.log - this is when running launchctl bootstrap as the user:

2022-12-23 12:11:07.908091 (gui/501 [100003]) <Notice>: entering bootstrap mode
2022-12-23 12:11:07.908359 (gui/501/homebrew.mxcl.memcached) <Error>: Caller specified a plist with bad ownership/permissions: path = /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist, caller = launchctl[14134]
2022-12-23 12:11:07.908376 (gui/501 [100003]) <Notice>: Bootstrap by launchctl[14134] for /Volumes/Data/home/hackeron/Library/LaunchAgents/homebrew.mxcl.memcached.plist failed (122: Path had bad ownership/permissions)
2022-12-23 12:11:07.908386 (gui/501 [100003]) <Notice>: exiting bootstrap mode

Strangly, if I replace gui/501 with user/501 it works, looking at this page: https://gist.github.com/masklinn/a532dfe55bdeab3d60ab8e46ccc38a68 - it appears the system thinks I am not logged in? - but I am logged in and using the Mac as normal (locally with a mouse/keyboard/monitor, not remote):

$ whoami
hackeron
$ echo $UID
501
$ launchctl managername
Aqua

Any ideas?

Hackeron
  • 616
  • 7
  • 14

0 Answers0