From f6e39139d86b2a4e143a7965aad1dac2716747a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Knecht?= Date: Fri, 26 Jan 2024 17:31:27 +0100 Subject: [PATCH] weed/storage: Fix volume info file permissions (#5246) --- weed/storage/volume_info/volume_info.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/weed/storage/volume_info/volume_info.go b/weed/storage/volume_info/volume_info.go index 2c6896830..59c08a833 100644 --- a/weed/storage/volume_info/volume_info.go +++ b/weed/storage/volume_info/volume_info.go @@ -76,9 +76,8 @@ func SaveVolumeInfo(fileName string, volumeInfo *volume_server_pb.VolumeInfo) er return fmt.Errorf("failed to marshal %s: %v", fileName, marshalErr) } - writeErr := util.WriteFile(fileName, text, 0755) - if writeErr != nil { - return fmt.Errorf("failed to write %s: %v", fileName, writeErr) + if err := util.WriteFile(fileName, text, 0644); err != nil { + return fmt.Errorf("failed to write %s: %v", fileName, err) } return nil