Skip to content

Docker-compose volume permissions #8

@james-smith-za

Description

@james-smith-za

Not quite sure what the right way to phrase this in the docs is, otherwise I'd have made a PR with my own suggestion, so I'll describe the issue that I ran into and how I went about solving it.

I couldn't start up the service with podman compose up on Rocky Linux even after setting the PUID and PGID appropriately: permissions for the mounted directories. I think the issue is caused by SELinux.

I solved the problem by adding :z to the end of the lines describing the volumes, which in my understanding makes Docker indicate that the folder is shared: allowing the container to read from / write to it while preserving the same ability from the host.

I don't know whether adding that would be benign or problematic in other situations such as Ubuntu / Debian where you don't have SELinux enabled by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions