Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

mkdir /home/scanner/.cache/trivy/fanal: permission denied #368

Open
gongkimi123 opened this issue Aug 2, 2023 · 1 comment
Open

mkdir /home/scanner/.cache/trivy/fanal: permission denied #368

gongkimi123 opened this issue Aug 2, 2023 · 1 comment

Comments

@gongkimi123
Copy link

What steps did you take and what happened:

scan failed, harbor and harbor-scanner-trivy are docker deployed.

What did you expect to happen:

scan success

Anything else you would like to add:

2023-08-02T09:26:34Z [INFO] [/pkg/scan/job.go:387]: {
"uuid": "e91a1067-3050-11ee-9e9f-0242ac150008",
"name": "trivy",
"description": "",
"url": "http://192.168.101.41:8181",
"disabled": false,
"is_default": true,
"health": "healthy",
"auth": "",
"access_credential": "[HIDDEN]",
"skip_certVerify": true,
"use_internal_addr": true,
"adapter": "Trivy",
"vendor": "Aqua Security",
"version": "0.43.0",
"create_time": "2023-08-01T09:50:56.138188Z",
"update_time": "2023-08-01T09:50:56.13819Z"
}
2023-08-02T09:26:34Z [INFO] [/pkg/scan/job.go:387]: {
"registry": {
"url": "http://core:8080",
"authorization": "[HIDDEN]"
},
"artifact": {
"namespace_id": 9,
"repository": "fanruan_ops/nginx",
"tag": "v20.1.9-1.21.4",
"digest": "sha256:77079debf2aa06e89a28d7de20033feea487394128dbdbfb1f33dcd5612f1de1",
"mime_type": "application/vnd.docker.distribution.manifest.v2+json"
}
}
2023-08-02T09:26:34Z [INFO] [/pkg/scan/job.go:167]: Report mime types: [application/vnd.security.vulnerability.report; version=1.1]
2023-08-02T09:26:34Z [INFO] [/pkg/scan/job.go:224]: Get report for mime type: application/vnd.security.vulnerability.report; version=1.1
2023-08-02T09:26:36Z [INFO] [/pkg/scan/job.go:245]: Report with mime type application/vnd.security.vulnerability.report; version=1.1 is not ready yet, retry after 5 seconds
2023-08-02T09:26:41Z [ERROR] [/pkg/scan/job.go:294]: check scan report with mime type application/vnd.security.vulnerability.report; version=1.1: running trivy wrapper: running trivy: exit status 1: 2023-08-02T09:26:37.751Z �[31mFATAL�[0m init error: cache error: unable to initialize the cache: unable to initialize fs cache: failed to create cache dir: mkdir /home/scanner/.cache/trivy/fanal: permission denied
: general response handler: unexpected status code: 500, expected: 200

Environment:

  • Harbor version: 2.7.1
  • Harbor Scanner Adapter for Trivy version: 0.30.14
  • Harbor installation process ([Installer script][harbor-installer], [Helm chart][harbor-helm], etc.):

https://github.com/goharbor/harbor/releases/download/v2.7.1/harbor-offline-installer-v2.5.0.tgz

@yaohwu
Copy link

yaohwu commented Aug 3, 2023

try docker exec -u 0 and created and fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants