Grant read access for the error file to all users

This commit is contained in:
Nan Yu 2021-05-24 12:46:29 -07:00
parent 5e9516d2b4
commit c05d17c50c
1 changed files with 3 additions and 0 deletions

View File

@ -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.