Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umask for data #1725

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from
Open

Conversation

kronwerk
Copy link
Contributor

data files (both AOF and RDB) are created now using hardcoded filemode (0644).
that can be inconvenient in some cases.
in this PR it's proposed to create that files using server.umask providing more flexibility for a user.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.16%. Comparing base (41a4bc2) to head (4a34537).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1725      +/-   ##
============================================
+ Coverage     71.10%   71.16%   +0.05%     
============================================
  Files           123      123              
  Lines         65536    65536              
============================================
+ Hits          46599    46637      +38     
+ Misses        18937    18899      -38     
Files with missing lines Coverage Δ
src/aof.c 80.24% <100.00%> (ø)
src/replication.c 87.31% <100.00%> (+0.08%) ⬆️

... and 11 files with indirect coverage changes

@rjd15372
Copy link
Contributor

I don't have much experience in administrating valkey deployments, but maybe using the server binary mask isn't also what we're expecting.
If 644 is not flexible, then maybe we need a config option to override the default file permissions for both the rdb and aof files.

@kronwerk
Copy link
Contributor Author

I don't have much experience in administrating valkey deployments, but maybe using the server binary mask isn't also what we're expecting. If 644 is not flexible, then maybe we need a config option to override the default file permissions for both the rdb and aof files.

yeah, that was another option - but it appears to be an overkill to create 1 (or may be even 2, for AOF and RDB separately) another config setting to achieve this flexibility. I (maybe I'm wrong?) can't find a situation there we gonna need different permissions for AOF and RDB - and Valkey binary and AOF|RDB also

@kronwerk kronwerk marked this pull request as ready for review February 13, 2025 14:29
@kronwerk
Copy link
Contributor Author

kronwerk commented Feb 13, 2025

@madolson hi, could you please take a look at this PR? thx

src/aof.c Outdated Show resolved Hide resolved
Signed-off-by: kronwerk <[email protected]>
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.

3 participants