Merge pull request #2237 from wy65701436/gas-scanner

Fix permission issue catched by GAS Scanner
This commit is contained in:
Daniel Jiang 2017-05-05 16:23:40 +08:00 committed by GitHub
commit 301fe2c766

View File

@ -38,7 +38,7 @@ func NewLogger(jobID int64) (*log.Logger, error) {
log.Errorf("Failed to create directory for log file %s, the error: %v", logFile, err)
}
}
f, err := os.OpenFile(logFile, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0660)
f, err := os.OpenFile(logFile, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0600)
if err != nil {
log.Errorf("Failed to open log file %s, the log of job %d will be printed to standard output, the error: %v", logFile, jobID, err)
f = os.Stdout