fix(docker): set migrations dir permissions to 755 on COPY#475
Open
fix(docker): set migrations dir permissions to 755 on COPY#475
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
drew
approved these changes
Mar 19, 2026
Member
Author
|
I have read the DCO document and I hereby sign the DCO. |
Docker COPY preserves build-host file permissions. On hosts with a restrictive umask (e.g. 0027), the migrations directory is copied as 750 root:root, making it unreadable by the openshell user at runtime and causing the server to crash with a permission denied error on startup. Using --chmod=755 ensures the directory is always world-readable regardless of the build host umask. Signed-off-by: Evan Lezar <elezar@nvidia.com>
7e20f84 to
d7c08a8
Compare
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.
Summary
Docker COPY preserves build-host file permissions. On hosts with a restrictive umask (e.g. 0027), the migrations directory is copied as 750 root:root, making it unreadable by the openshell user at runtime and causing the server to crash with a permission denied error on startup. Using
--chmod=755ensures the directory is always world-readable regardless of build host umask.Related Issue
N/A
Changes
--chmod=755to theCOPYinstruction for the migrations directory indeploy/docker/Dockerfile.imagesTesting
mise run pre-commitpassesChecklist