Open hedefalk opened 1 year ago
You bring up a good point @hedefalk. Unfortunately it doesn't look like this is configurable on the brew services
side. Looking into their source, looks like they intentionally do this as a protection measure:
https://github.com/Homebrew/homebrew-services/blob/d39f864ddffda7a8c47dc95cd284b50683db9653/lib/service/services_cli.rb#L183
Since sudo brew services start
registers the app to run on boot (as root), I imagine brew
is trying to prevent users from accidentally modifying/removing it. Not 100% sure what would happen if it was modified to be honest, ie. would macos fail to boot if it couldn't run the app?
sudo brew services start
uses launchctl
under the hood, so we could consider bypassing brew services
and register the app manually (without modifying ownership). I think I'd like to fully understand why brew services
does this first before making that decision.
I guess this needs to be run as root for the tunneling - but is there any way to separate the actual running from taking ownership of the paths? I get this on starting the service: