Repository navigation
Use octal file modes in the Redis and Valkey modules - #1626
Open
Mario-Mohar wants to merge 1 commit into
Open
Mario-Mohar wants to merge 1 commit into
Mario-Mohar wants to merge 1 commit into
Conversation
Mario-Mohar
marked this pull request as ready for review
October 30, 2026 11:36
This branch has not been deployed
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
The Redis and Valkey modules copied the initial data file and
import.shwith modes666and777written as decimal numbers, which Docker applies as octal1232and1411. The data file ended up write only for its owner and the script read only for its owner.This changes them to
0o644and0o755and adds a short JSDoc note onFileToCopy.modeandContentToCopy.modesaying the value is an octal permission.#1525 will follow in a separate PR. While testing it I found that a password with a space also breaks the Redis server start and
executeCliCmd, so I've asked on that issue how much of it should go into one change.Verification
New test in both modules: after
withInitialData, the image's own non-root user (redis,valkey) must be able to read the data file and read and executeimport.sh. It runs against every image inIMAGES.test -rexits with 1)npx vitest run packages/modules/redis packages/modules/valkey, 57 passednpm run format,npm run lint,npm run knipandnpm run check-compilespassRun with Podman 6.1 through the Docker socket.
Not breaking
Only the permissions of two files the modules copy for their own import change. Root still has full access, so
withInitialDatabehaves as before. The JSDoc change is documentation only.Closes #1526