From 39d3b55a348c70867fc0711b619acaa83a71a78c Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Fri, 15 Mar 2024 00:26:22 +0300 Subject: [PATCH] node: dir and file permissions to allow non-root to read UUID Signed-off-by: HeshamTB --- node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node.go b/node.go index 45740ff..6a4f2d0 100644 --- a/node.go +++ b/node.go @@ -41,13 +41,13 @@ func InitNodeUUID() (*uuid.UUID, error) { } func createNodeUUID() (*uuid.UUID, error) { - err := os.MkdirAll(CONFIG_PATH, 0600) + err := os.MkdirAll(CONFIG_PATH, 0755) if err != nil { return nil, err } mode := os.O_RDWR | os.O_CREATE | os.O_EXCL - f, err := os.OpenFile(UUID_PATH, mode, 0600) + f, err := os.OpenFile(UUID_PATH, mode, 0644) if err != nil { return nil, err }