Skip to content

Commit

Permalink
fix(snapshot): grant execution permissions to the snapshot dir for th…
Browse files Browse the repository at this point in the history
…e owner (#18294)

Co-authored-by: Julien Robert <[email protected]>
(cherry picked from commit a378303)
  • Loading branch information
luchenqun authored and mergify[bot] committed Oct 29, 2023
1 parent d3c9653 commit c55ea1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func DefaultBaseappOptions(appOpts types.AppOptions) []func(*baseapp.BaseApp) {
func GetSnapshotStore(appOpts types.AppOptions) (*snapshots.Store, error) {
homeDir := cast.ToString(appOpts.Get(flags.FlagHome))
snapshotDir := filepath.Join(homeDir, "data", "snapshots")
if err := os.MkdirAll(snapshotDir, 0o644); err != nil {
if err := os.MkdirAll(snapshotDir, 0o744); err != nil {

Check failure

Code scanning / gosec

Expect directory permissions to be 0750 or less Error

Expect directory permissions to be 0750 or less
return nil, fmt.Errorf("failed to create snapshots directory: %w", err)
}

Expand Down

0 comments on commit c55ea1f

Please sign in to comment.