Conversation
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.
Problem
On Linux, following the Docker Compose setup from a root-owned checkout causes the backend to restart continuously. Startup first fails with
PermissionError: [Errno 13] Permission denied: 'WareHouse', then with the same error forlogsafter the first folder is manually repaired. Workflow storage also needs a writabledata/directory.The image assigns
/apptoappuser, but Compose's.:/appbind mount hides that image ownership. The non-root backend therefore cannot create its runtime storage in the host checkout.Change
Add a one-shot
backend-initCompose service which preparesWareHouse/,logs/, anddata/before the backend starts. Only this initializer runs as root; the backend retains the image's non-root user. Existing storage content is retained and assigned toappuser, without changing source-file ownership. The initializer lives outside/appso the checkout mount cannot hide it.Symlinked storage roots are rejected, and nested symlinks are not followed. Custom storage locations still require explicit permissions. Document the setup and Docker-native workflow sync command in both READMEs.
Validation
sh tools/test_docker_permissions.sh chatdev-permissions-test: reproduced the original permission failure using a root-owned Linux Docker volume; ran initialization twice; verified existing data preservation, unchanged source ownership, non-root writes to all three directories, successful backend HTTP startup, and workflow database read/write.docker compose config --quiet, shell syntax validation, andgit diff --check.The regression uses a root-owned Docker volume to reproduce Linux ownership semantics independently of Docker Desktop host-file sharing. It does not exercise model inference or the frontend. The original failure and manual recovery were also observed on an Ubuntu ARM64 host.