diff --git a/log/logger.go b/log/logger.go index a579dca..c250c16 100644 --- a/log/logger.go +++ b/log/logger.go @@ -631,10 +631,10 @@ func (l *Logger) compressLogFile(srcFile, dstFile string) error { _ = f.Close() }() - if err = os.MkdirAll(l.dir(), 0755); err != nil { + if err = os.MkdirAll(l.dir(), 0750); err != nil { return err } - gzf, err := os.OpenFile(filepath.Join(l.dir(), filepath.Clean(dstFile)), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) + gzf, err := os.OpenFile(filepath.Join(l.dir(), filepath.Clean(dstFile)), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) if err != nil { return err }