webgui: run as the actual /work owner, incl. root (fix macOS perms)#26
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The entrypoint added in #25 fell back to the non-root
fvsuser 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-writablefvsuser anddir.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 roottest 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
tests/unitortests/integration), or N/A.data/README.md).