mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Fix permission issue in job_log directory
This commit is contained in:
parent
e60de3e39d
commit
b3e0af2382
@ -5,5 +5,8 @@ fi
|
||||
if [ -d /var/log/jobs ]; then
|
||||
chown -R 10000:10000 /var/log/jobs/
|
||||
fi
|
||||
if [ -d /var/log/jobs/scan_job ]; then
|
||||
chmod +x /var/log/jobs/scan_job
|
||||
fi
|
||||
sudo -E -u \#10000 "/harbor/harbor_jobservice"
|
||||
|
||||
|
@ -28,7 +28,7 @@ func NewLogger(j Job) (*log.Logger, error) {
|
||||
logFile := j.LogPath()
|
||||
d := filepath.Dir(logFile)
|
||||
if _, err := os.Stat(d); os.IsNotExist(err) {
|
||||
err := os.MkdirAll(d, 0660)
|
||||
err := os.MkdirAll(d, 0755)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to create directory for log file %s, the error: %v", logFile, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user