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.
This commit is contained in:
committed by
Nate Finch
parent
7d6a187557
commit
2e8fbeea3f
+1
-1
@@ -212,7 +212,7 @@ func (l *Logger) openNew() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
name := l.filename()
|
name := l.filename()
|
||||||
mode := os.FileMode(0644)
|
mode := os.FileMode(0600)
|
||||||
info, err := os_Stat(name)
|
info, err := os_Stat(name)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Copy the mode off the old logfile.
|
// Copy the mode off the old logfile.
|
||||||
|
|||||||
Reference in New Issue
Block a user