From 346e49e44fb62949a3a87fdfa5d16601c9244725 Mon Sep 17 00:00:00 2001 From: Marco Paganini Date: Sun, 4 Feb 2024 19:51:33 -0800 Subject: [PATCH] Set perms of prometheus textfile to 0644. --- prom.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prom.go b/prom.go index 39e02ba..2f57014 100644 --- a/prom.go +++ b/prom.go @@ -92,6 +92,9 @@ func writeNodeTextFile(filename string, name string) error { } defer os.Remove(temp.Name()) defer temp.Close() + if err := os.Chmod(temp.Name(), 0644); err != nil { + return err + } _, err = temp.Write(output) if err != nil {