From 5ab104476c17e1db27053a87d4fe22faea9e02d1 Mon Sep 17 00:00:00 2001 From: "Anthony \"Ishpeck\" Tedjamulia" Date: Wed, 3 Jun 2020 13:35:48 -0600 Subject: [PATCH] Fixing systemd complaint that service configurations are world-inaccessible after install --- service_systemd_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_systemd_linux.go b/service_systemd_linux.go index 99c5e2a..8b82109 100644 --- a/service_systemd_linux.go +++ b/service_systemd_linux.go @@ -132,7 +132,7 @@ func (s *systemd) Install() error { return fmt.Errorf("Init already exists: %s", confPath) } - f, err := os.Create(confPath) + f, err := os.OpenFile(confPath, os.O_WRONLY|os.O_CREATE, 0644) if err != nil { return err }