From 0bc6756a4ab1b720abfa4a523befc3618d4b2d28 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:53:19 +0000 Subject: [PATCH] fix: use a lower file permission in file creation (backport #18206) (#18263) Co-authored-by: Marko --- server/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/util.go b/server/util.go index 571f501e5cd6..65017473310a 100644 --- a/server/util.go +++ b/server/util.go @@ -527,7 +527,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, os.ModePerm); err != nil { + if err := os.MkdirAll(snapshotDir, 0o644); err != nil { return nil, fmt.Errorf("failed to create snapshots directory: %w", err) }