change the permission of job log file

Log file permission from 644 to 600

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2019-09-23 14:29:28 +08:00
parent 360334991e
commit 4333c3ad5c

View File

@ -16,7 +16,7 @@ type FileLogger struct {
// NewFileLogger crates a new file logger // NewFileLogger crates a new file logger
// nil might be returned // nil might be returned
func NewFileLogger(level string, logPath string, depth int) (*FileLogger, error) { func NewFileLogger(level string, logPath string, depth int) (*FileLogger, error) {
f, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY, 0644) f, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY, 0600)
if err != nil { if err != nil {
return nil, err return nil, err
} }