From 331e106b97f1f88f74f4d78a5a2674ff5837338b Mon Sep 17 00:00:00 2001 From: Marko Date: Thu, 26 Oct 2023 09:48:36 +0200 Subject: [PATCH] fix: use a lower file permission in file creation (#18206) --- server/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/util.go b/server/util.go index dae0a21abb7e..32cd46d6b946 100644 --- a/server/util.go +++ b/server/util.go @@ -533,7 +533,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) }