From c05d17c50c8932791d52b0854016743e748f68d9 Mon Sep 17 00:00:00 2001 From: Nan Yu Date: Mon, 24 May 2021 12:46:29 -0700 Subject: [PATCH] Grant read access for the error file to all users --- cmd/git-sync/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/git-sync/main.go b/cmd/git-sync/main.go index a064d82..c9eccc0 100644 --- a/cmd/git-sync/main.go +++ b/cmd/git-sync/main.go @@ -259,6 +259,9 @@ func (l *customLogger) writeContent(content []byte) { l.Logger.Error(err, "can't rename to error-file", "temp-file", tmpFile.Name(), "error-file", errorFile) return } + if err := os.Chmod(errorFile, 0644) ; err != nil { + l.Logger.Error(err, "can't change the mod of the error-file", "error-file", errorFile) + } } // deleteErrorFile deletes the error file.