Failed to push image with error filesystem: mkdir /registry/docker: permission denied in OpenShift 4
Issue
-
Errors like the following one are being spotted while uploading an image to the internal Image Registry:
Error: Error copying image to the remote destination: Error writing blob: Error initiating layer upload to /v2/registry/namespace/blobs/uploads/ in default-route-openshift-image-registry.apps.example.com: received unexpected HTTP status: 500 Internal Server Error
-
The registry logs shows messages like the following ones:
level=error msg="error putting into main store: filesystem: mkdir /registry/docker: permission denied" go.version=go1.10.8 http.request.host="image-registry.openshift-image-registry.svc:5000" http.request.id=00000000-0000-0000-0000-000000000000 http.request.method=GET http.request.remoteaddr="10.0.1.1:56789" http.request.uri="/v2/openshift/httpd/manifests/sha256:e67868a558cfe45441e1c326de6d67596fc61b65aa183066fbadfe53c20fb415" http.request.useragent=Go-http-client/1.1 openshift.auth.user="system:serviceaccount:clustervalidation:builder"
level=error msg="response completed with error" err.code=unknown err.detail="filesystem: mkdir /registry/docker: permission denied" err.message="unknown error" go.version="go1.22.5 (Red Hat 1.22.5-1.el9) X:strictfipsruntime" http.request.host=default-route-openshift-image-registry.apps.example.com http.request.id=00000000-0000-0000-0000-000000000000 http.request.method=POST http.request.remoteaddr=10.0.1.1 http.request.uri=/v2/default/httpd/blobs/uploads/ http.request.useragent="containers/5.29.5 (github.com/containers/image)" http.response.contenttype=application/json http.response.duration=15ms http.response.status=500 http.response.written=156 openshift.auth.user="kube:admin" vars.name=default/httpd
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Internal Image Registry
- NFS
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.