Repository navigation
fix(snapshot): create the restored etcd data directory with 0700 - #4275
Merged
Merged
Conversation
The restore path moved the embedded etcd data directory aside and recreated it with 0777. etcd creates and checks its data directory with 0700, and the directory holds the restored database with every Secret of the virtual cluster. Unit test added for backupFolder. Signed-off-by: Youssef Omar Bouden <youssef.bouden2002@gmail.com>
r0bnet
previously approved these changes
Nov 18, 2026
r0bnet
approved these changes
Nov 19, 2026
cbalan
approved these changes
Nov 19, 2026
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.
What issue type does this pull request address?
/kind bugfix
What does this pull request do? Which issues does it resolve?
resolves #4274
The restore path recreated the embedded etcd data directory with mode 0777. It is now created with 0700, the mode etcd uses and checks for its data directory. Unit test added for
backupFolder.Please provide a short message that should be published in the vcluster release notes
Fixed the restore command creating the embedded etcd data directory world accessible.
Note
Low Risk
Narrow permissions fix on restore directory creation with regression test coverage; no auth or data-handling logic changes.
Overview
The snapshot restore path in
backupFoldernow recreates the embedded etcd data directory with mode0700instead of0777, matching what etcd expects so restores no longer leave the data dir world-readable/writable.A unit test
TestBackupFolderRecreatesPrivateDirasserts the recreated directory permissions and that the prior tree is kept underdir.backup.Reviewed by Cursor Bugbot for commit a15ee9e. Bugbot is set up for automated code reviews on this repo. Configure here.