fix: use a lower file permission in file creation (backport #18206) (#18263)

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
mergify[bot] 2023-10-26 10:53:19 +00:00 committed by GitHub
parent d8957530a5
commit 0bc6756a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}