macOS: run the launchd daemon as root so it can reach the LAN
On macOS 15, Local Network privacy blocks LAN connections from a launchd daemon running as a user (EHOSTUNREACH; curl works), and a daemon can't show the permission prompt. Tested on 15.3.1 with the probe's own Python: a root daemon connects to the hub, the same daemon with UserName gets "No route to host". The plist no longer sets UserName. The checkout, venv and <name>-update stay owned by the installing user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
30ce39d5f0
commit
380243545c
4 changed files with 17 additions and 4 deletions
|
|
@ -148,7 +148,9 @@ Docker also changes the firewall: its rules and a `DROP` policy on the `FORWARD`
|
|||
### Mac mini
|
||||
|
||||
1. Run the probe command above as your user. It needs the Xcode Command Line Tools (`xcode-select --install`) and Python 3.11+. If Python is missing, it installs `python@3.13` with Homebrew.
|
||||
2. It installs a LaunchDaemon (`/Library/LaunchDaemons/dev.neilbantoc.network-probe.plist`) that runs as your user from boot, with no login needed.
|
||||
2. It installs a LaunchDaemon (`/Library/LaunchDaemons/dev.neilbantoc.network-probe.plist`) that runs from boot, with no login needed.
|
||||
- **It runs as root.** On macOS 15, Local Network privacy blocks a background service running as your user from reaching LAN addresses: you'd see `No route to host` while `curl` works. A service running as root is exempt, and a background service can't show the permission prompt.
|
||||
- **Your user still owns** the checkout, the Python environment and updates.
|
||||
3. Logs go to `/opt/network-probe/data/service.log`.
|
||||
4. Keep the Mac awake. In System Settings → Energy, turn on "Prevent automatic sleeping", or the probe stops while the Mac sleeps.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue