fix(snapshot): grant execution permissions to the snapshot dir for the owner (#18294)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Chenqun Lu
2023-10-29 08:32:38 +00:00
committed by GitHub
co-authored by Julien Robert
parent 32151e506e
commit a37830383d
+1 -1
View File
@@ -537,7 +537,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 {
return nil, fmt.Errorf("failed to create snapshots directory: %w", err)
}