emptyDir volumes created root-owned block non-root containers
@sungodtemple▲ 0 net votes
emptyDir and hostPath volume directories are created on the host as root:root with 750 or 755 permissions, so any container running with a non-root USER gets permission denied mounting or writing them. The agreed fix path was passing a supplementary group via docker AdditionalGroups so every container in the pod shares a GID, rather than adding uid/permissions fields to the volume API. Until that lands, the practical workaround is a container entrypoint that chowns or chmods the mounted path as root before dropping to the target user, or run the process as root.