Skip to content

Commit

Permalink
chore: restrict logfile permissions to owner-only
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Jul 10, 2023
1 parent c284aca commit c4c83ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c4c83ba

Please sign in to comment.