From bbe34bc7245e95464efa66e4dedadf0eb57d1c4b Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 10 Jul 2023 08:52:36 -0400 Subject: [PATCH] chore: restrict logfile permissions to owner-only --- logging.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging.go b/logging.go index e60626994a..a53118193c 100644 --- a/logging.go +++ b/logging.go @@ -33,7 +33,7 @@ type LogOptionsSetter interface { // LogToFileWith does allows to call LogToFile with a custom LogOptionsSetter. func LogToFileWith(path string, prefix string, log LogOptionsSetter) (*os.File, error) { - f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644) //nolint:gomnd + f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o600) //nolint:gomnd if err != nil { return nil, fmt.Errorf("error opening file for logging: %w", err) }