From 6f4dc20be0ca64362b9036907ff2a1683147835e 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) (cherry picked from commit 331e106b97f1f88f74f4d78a5a2674ff5837338b) --- server/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/util.go b/server/util.go index cd61397501e9..7afd2b2bf0f6 100644 --- a/server/util.go +++ b/server/util.go @@ -523,7 +523,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) }