Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

Relationships

#452 Support privileged autoupdate schedulers for root-owned binaries on Linux

Opened by stack72 · 5/26/2026· Shipped 5/26/2026

Problem

swamp-club#449 added LaunchDaemon support for macOS when the swamp binary is root-owned. The same underlying problem exists on Linux — a user-level systemd timer or user crontab cannot overwrite a root-owned binary at paths like /usr/local/bin/swamp.

Currently on Linux:

  • systemd path: uses systemctl --user timers which run as the logged-in user
  • cron path: uses the user's crontab which runs as the logged-in user

Neither can write to a root-owned binary, so autoupdate silently fails.

Proposed Solution

Extend the ownership detection and privileged scheduler pattern from the macOS LaunchDaemon work (PR #1451) to Linux:

  • systemd path: Install a system-level timer at /etc/systemd/system/ instead of a user timer at ~/.config/systemd/user/, requiring sudo systemctl instead of systemctl --user
  • cron path: Use root crontab (sudo crontab) instead of user crontab (crontab -e)

The ownership detection infrastructure (detectBinaryOwnership, createScheduler with mode parameter, scheduler type reporting in doctor install) is already in place from the macOS work. The Linux side needs two new scheduler variants and the corresponding install/remove/status implementations.

Alternatives

Only support the systemd path for privileged updates (skip cron). This would simplify the implementation but leave users without systemd unsupported.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

5/26/2026, 11:55:45 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/26/2026, 9:34:32 PM

Sign in to post a ripple.