output: fix WriteStoreDebugData file permissions (#2187)

Fixes #2180
dev
M. Ángel Jimeno 2022-06-20 13:40:22 +02:00 committed by GitHub
parent cba6dbb8f4
commit af4854f90d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ func (w *StandardWriter) WriteStoreDebugData(host, templateID, eventType string,
_ = fileutil.CreateFolder(subFolder) _ = fileutil.CreateFolder(subFolder)
} }
filename = filepath.Join(subFolder, fmt.Sprintf("%s.txt", filename)) filename = filepath.Join(subFolder, fmt.Sprintf("%s.txt", filename))
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, os.ModePerm) f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
if err != nil { if err != nil {
fmt.Print(err) fmt.Print(err)
return return