Skip to content

Commit

Permalink
Make default file permissions more restrictive (#83)
Browse files Browse the repository at this point in the history
This asures that the process can still read and write its own log file,
but that other users cannot. This is a fairly standard mode for log
files in linux.
  • Loading branch information
JAORMX authored and natefinch committed Apr 11, 2019
1 parent 7d6a187 commit 2e8fbee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lumberjack.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (l *Logger) openNew() error {
}

name := l.filename()
mode := os.FileMode(0644)
mode := os.FileMode(0600)
info, err := os_Stat(name)
if err == nil {
// Copy the mode off the old logfile.
Expand Down

0 comments on commit 2e8fbee

Please sign in to comment.