Fix permissions of atomically-written files#274
Merged
Merged
Conversation
ofek
commented
May 13, 2026
|
|
||
| new_config[key] = new_value | ||
| new_config = new_config[key] # type: ignore[assignment] | ||
| new_config = new_config[key] |
Contributor
Author
There was a problem hiding this comment.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 4e25056 | Docs | Datadog PR Page | Give us feedback! |
Contributor
Author
|
I'm merging the fix now as tomorrow is a holiday in the EU and there will be no reviews. |
github-actions Bot
pushed a commit
that referenced
this pull request
May 13, 2026
* Fix permissions of atomically-written files * Fix type hint for new release of TOML writing dependency * Fix tests on non-Windows platforms 50c5ffb
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.
Fix atomic config rewrites so replacement files preserve expected permissions. New config files now respect the user's umask, while rewrites preserve the existing file mode and avoid temporarily exposing private files with broader permissions.
See a workaround in the dev env here. Atomic writes were creating the temporary replacement file with private owner-only permissions, so replacing
config.tomlmade it inaccessible to other users in the same shared group.