From 2e8fbeea3f9e456ee5062dfbcbe3ee902a44bace Mon Sep 17 00:00:00 2001 From: Juan Osorio Robles Date: Thu, 11 Apr 2019 17:42:26 +0300 Subject: [PATCH] Make default file permissions more restrictive (#83) 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. --- lumberjack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lumberjack.go b/lumberjack.go index 46d97c5..a40441c 100644 --- a/lumberjack.go +++ b/lumberjack.go @@ -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.