-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Backport of Fixing excessive unix file permissions into release/1.8.x #14841
Backport of Fixing excessive unix file permissions into release/1.8.x #14841
Conversation
d09ebca
to
8219da1
Compare
@@ -274,7 +274,7 @@ func EnsurePath(path string, dir bool) error { | |||
if !dir { | |||
path = filepath.Dir(path) | |||
} | |||
return os.MkdirAll(path, 0o755) | |||
return os.MkdirAll(path, 0o750) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember seeing this as 0o700 in your main PR. https://github.com/hashicorp/vault/pull/14791/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it seems that backport assistant is not doing the right job. I will push manual backports for all of these.
@@ -86,7 +86,7 @@ func NewBoltSnapshotStore(base string, logger log.Logger, fsm *FSM) (*BoltSnapsh | |||
|
|||
// Ensure our path exists | |||
path := filepath.Join(base, snapPath) | |||
if err := os.MkdirAll(path, 0o755); err != nil && !os.IsExist(err) { | |||
if err := os.MkdirAll(path, 0o750); err != nil && !os.IsExist(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above comment
@@ -324,7 +324,7 @@ func (s *BoltSnapshotSink) writeBoltDBFile() error { | |||
s.logger.Info("creating new snapshot", "path", path) | |||
|
|||
// Make the directory | |||
if err := os.MkdirAll(path, 0o755); err != nil { | |||
if err := os.MkdirAll(path, 0o750); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above comment
Backport
This PR is auto-generated from #14791 to be assessed for backporting due to the inclusion of the label backport/1.8.x.
WARNING automatic cherry-pick of commits failed. Commits will require human attention.
The below text is copied from the body of the original PR.
I also ran https://github.com/securego/gosec#github-action