Skip to content

webgui: run as the actual /work owner, incl. root (fix macOS perms)#26

Merged
RoopsyDaisy merged 2 commits into
mainfrom
webgui-perms-mount-owner
Jun 3, 2026
Merged

webgui: run as the actual /work owner, incl. root (fix macOS perms)#26
RoopsyDaisy merged 2 commits into
mainfrom
webgui-perms-mount-owner

Conversation

@RoopsyDaisy

Copy link
Copy Markdown
Owner

The entrypoint added in #25 fell back to the non-root fvs user whenever /work's owner resolved to uid 0 -- but that is exactly the macOS case: Docker Desktop presents the bind mount as root-owned, so the fallback ran the un-writable fvs user and dir.create() for a new project still failed with "Permission denied" (image confirmed at rev 43d81ec, entrypoint + gosu present).

Fix: drop the uid==0 fallback and always gosu to the mount owner. On macOS that is root, which CAN write the mount (Docker Desktop maps container-root writes to the host user -- as the working --user root test showed); on Linux it's the host user's real uid (files owned by them); for an unmounted /work / named volume / CI smoke test it's root, which is fine.

What & why

Checklist

  • CI is green (build + in-image smoke test + R test suite).
  • Docs updated to match any code/behaviour change (this repo has drifted before — keep prose true).
  • Tests added/updated for the change (tests/unit or tests/integration), or N/A.
  • No data, secrets, or chat history committed (inventory CSVs stay out — see data/README.md).

RoopsyDaisy and others added 2 commits June 3, 2026 02:23
The entrypoint added in #25 fell back to the non-root `fvs` user whenever
/work's owner resolved to uid 0 -- but that is exactly the macOS case: Docker
Desktop presents the bind mount as root-owned, so the fallback ran the
un-writable `fvs` user and `dir.create()` for a new project still failed with
"Permission denied" (image confirmed at rev 43d81ec, entrypoint + gosu present).

Fix: drop the uid==0 fallback and always gosu to the mount owner. On macOS that
is root, which CAN write the mount (Docker Desktop maps container-root writes to
the host user -- as the working `--user root` test showed); on Linux it's the
host user's real uid (files owned by them); for an unmounted /work / named volume
/ CI smoke test it's root, which is fine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The webgui permission bugs (#25, then its uid==0 fallback) shipped because the
smoke test never wrote into /work, so CI couldn't tell that the GUI process can't
create a project there. Add a webgui-only guard that does the same write fvsOL
does (a dir under /work) through the entrypoint-selected user. In CI /work is
root-owned and unmounted, so a non-root runtime user (the #25 fvs-on-uid-0
fallback) fails this guard; running as the mount owner (root, per #26) passes.
Cluster image skips it (no fvsOL; it runs as fvs against a separately-bound cwd).

Locks the permission class so a future entrypoint change can't silently
reintroduce it.

https://claude.ai/code/session_011C6wxKosiwHnEYvAPJfmcW
@RoopsyDaisy RoopsyDaisy merged commit 98e3f12 into main Jun 3, 2026
6 checks passed
@RoopsyDaisy RoopsyDaisy deleted the webgui-perms-mount-owner branch June 3, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants