Skip to content

"filesystem: mkdir /var/lib/registry/docker: permission denied" during zarf init #4669

@unknown0816

Description

@unknown0816

Hi,
I have a rocky linux with a rke2 installed and running. During zarf installation I configure to use my hostpath pv, but during installation following error occurs:

2026-03-03 10:27:17 INF starting deploy package=init
2026-03-03 10:27:17 INF deploying component name=zarf-injector
2026-03-03 10:27:17 INF copying files count=1
2026-03-03 10:27:17 INF loading file name=###ZARF_TEMP###/zarf-injector
2026-03-03 10:27:17 INF waiting for cluster connection
2026-03-03 10:27:18 INF creating Zarf injector resources
2026-03-03 10:27:19 INF adding archived binary configmaps of registry image to the cluster
2026-03-03 10:27:29 INF deploying component name=zarf-seed-registry
2026-03-03 10:27:29 INF processing Helm chart name=docker-registry version=1.0.1 source=Zarf-generated
2026-03-03 10:27:29 INF performing Helm upgrade chart=docker-registry
2026-03-03 10:27:32 INF running health checks chart=docker-registry
2026-03-03 10:27:41 INF deploying component name=zarf-registry
2026-03-03 10:27:41 INF pushing image name=docker.io/alpine/socat:1.8.0.3
2026-03-03 10:27:46 INF image push in progress name=docker.io/alpine/socat:1.8.0.3 complete=0.0% remaining=4.41 MBs
2026-03-03 10:27:54 INF image push in progress name=docker.io/alpine/socat:1.8.0.3 complete=0.0% remaining=4.41 MBs
2026-03-03 10:27:57 INF pushing image name=docker.io/library/registry:3.0.0
2026-03-03 10:28:02 INF image push in progress name=docker.io/library/registry:3.0.0 complete=0.0% remaining=18.56 MBs
2026-03-03 10:28:10 INF image push in progress name=docker.io/library/registry:3.0.0 complete=0.0% remaining=18.56 MBs
2026-03-03 10:28:13 INF pushing image name=docker.io/library/registry:3.0.0
2026-03-03 10:28:18 INF image push in progress name=docker.io/library/registry:3.0.0 complete=0.0% remaining=18.56 MBs
2026-03-03 10:28:26 INF image push in progress name=docker.io/library/registry:3.0.0 complete=0.0% remaining=18.56 MBs
2026-03-03 10:28:28 ERR failed to deploy package: unable to deploy component "zarf-registry": unable to push images to the registry: All attempts fail:
#1: All attempts fail:
#1: failed to push image docker.io/alpine/socat:1.8.0.3: failed to perform "Push" on destination: POST "http://127.0.0.1:45763/v2/alpine/socat/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied
#2: failed to push image docker.io/alpine/socat:1.8.0.3: failed to perform "Push" on destination: POST "http://127.0.0.1:45763/v2/alpine/socat/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied
#2: All attempts fail:
#1: failed to push image docker.io/library/registry:3.0.0: failed to perform "Push" on destination: POST "http://127.0.0.1:43609/v2/library/registry/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied
#2: failed to push image docker.io/library/registry:3.0.0: failed to perform "Push" on destination: POST "http://127.0.0.1:43609/v2/library/registry/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied
#3: All attempts fail:
#1: failed to push image docker.io/library/registry:3.0.0: failed to perform "Push" on destination: POST "http://127.0.0.1:44685/v2/library/registry/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied
#2: failed to push image docker.io/library/registry:3.0.0: failed to perform "Push" on destination: POST "http://127.0.0.1:44685/v2/library/registry/blobs/uploads/": response status code 500: unknown: unknown error: filesystem: mkdir /var/lib/registry/docker: permission denied

I tried to create the directory manual and provide the permissions but nothing worked so far.

Can someone help please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions