Run panel-api with reudy's primary group #6

Merged
reudy merged 1 commit from fix-service-primary-group into main 2026-10-20 17:48:24 +02:00
Member

Deploys fail again, this time with:

running `/run/wrappers/bin/newuidmap 63679 0 1000 1 1 100000 65536`: newuidmap: Target process is owned by a different user: uid:1000 pw_uid:1000 st_uid:1000, gid:992 pw_gid:100 st_gid:992
Error: cannot set up namespace using "/run/wrappers/bin/newuidmap": exit status 1

newuidmap only maps IDs for a process whose uid and gid match the calling user's passwd entry. The unit set Group = panelroutes (992), but reudy's primary group is users (100), so it refuses.

It worked after #4 only while a podman pause process from a login shell still held reudy's rootless user namespace; once that went away (e.g. after a reboot) the panel had to create the namespace itself and hit this.

panelroutes is only needed to write the Caddy routes file, which panelctl already does with an explicit install -g "$PANEL_GROUP". That works with a supplementary group, so this swaps Group for SupplementaryGroups.

Not built locally (no Nix on the dev box). After merging, on the server:

nix flake update panel && sudo nixos-rebuild switch --flake .#vps

Then redeploy from the panel, and check a route change still reaches Caddy (ls -l /var/lib/containers/routes/ should still show group panelroutes).

🤖 Generated with Claude Code

https://claude.ai/code/session_018s1T5e2bQY6WrX4JeEyEPM

Deploys fail again, this time with: ``` running `/run/wrappers/bin/newuidmap 63679 0 1000 1 1 100000 65536`: newuidmap: Target process is owned by a different user: uid:1000 pw_uid:1000 st_uid:1000, gid:992 pw_gid:100 st_gid:992 Error: cannot set up namespace using "/run/wrappers/bin/newuidmap": exit status 1 ``` `newuidmap` only maps IDs for a process whose uid **and** gid match the calling user's passwd entry. The unit set `Group = panelroutes` (992), but reudy's primary group is `users` (100), so it refuses. It worked after #4 only while a podman pause process from a login shell still held reudy's rootless user namespace; once that went away (e.g. after a reboot) the panel had to create the namespace itself and hit this. `panelroutes` is only needed to write the Caddy routes file, which `panelctl` already does with an explicit `install -g "$PANEL_GROUP"`. That works with a supplementary group, so this swaps `Group` for `SupplementaryGroups`. **Not built locally** (no Nix on the dev box). After merging, on the server: ```sh nix flake update panel && sudo nixos-rebuild switch --flake .#vps ``` Then redeploy from the panel, and check a route change still reaches Caddy (`ls -l /var/lib/containers/routes/` should still show group `panelroutes`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018s1T5e2bQY6WrX4JeEyEPM
agent added 1 commit 2026-10-20 17:43:13 +02:00
Deploys failed with "newuidmap: Target process is owned by a different
user: ... gid:992 pw_gid:100". newuidmap only maps for a process whose
gid matches the user's passwd entry, and the unit forced
Group=panelroutes. It only worked while a podman pause process from a
login shell still held reudy's user namespace.

panelroutes is only needed to write the Caddy routes file, which
panelctl does with an explicit `install -g`; a supplementary group is
enough for that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018s1T5e2bQY6WrX4JeEyEPM
reudy merged commit 9dbd4584e4 into main 2026-10-20 17:48:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/panel#6
No description provided.