mirror of
https://github.com/goharbor/harbor
synced 2025-04-16 08:33:59 +00:00
Fix permission issue catched by GAS Scanner
This commit is contained in:
parent
a4a5ff6c60
commit
045b5a1c63
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user