Skip to content

fix(docker): set migrations dir permissions to 755 on COPY#475

Open
elezar wants to merge 1 commit intomainfrom
fix/migrations-dir-permissions
Open

fix(docker): set migrations dir permissions to 755 on COPY#475
elezar wants to merge 1 commit intomainfrom
fix/migrations-dir-permissions

Conversation

@elezar
Copy link
Member

@elezar elezar commented Mar 19, 2026

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=755 ensures the directory is always world-readable regardless of build host umask.

Related Issue

N/A

Changes

  • Added --chmod=755 to the COPY instruction for the migrations directory in deploy/docker/Dockerfile.images

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@elezar elezar requested a review from a team as a code owner March 19, 2026 15:52
@elezar elezar self-assigned this Mar 19, 2026
@github-actions
Copy link

github-actions bot commented Mar 19, 2026

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@elezar
Copy link
Member Author

elezar commented Mar 19, 2026

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>
@elezar elezar force-pushed the fix/migrations-dir-permissions branch from 7e20f84 to d7c08a8 Compare March 19, 2026 17:28
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