Rootless Podman - SELinux Relabelling Issue #22476
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Issue Description
I am using a rootless podman container, which gets access denied errors when trying to initialize the data structure on a named volume. In the selinux log there are entries like:
Steps to reproduce the issue
Steps to reproduce the issue
podman run --rm -it -v checkmk_sites:/omd/sites/ docker.io/checkmk/check-mk-raw:2.2.0-latest
Describe the results you received
Describe the results you expected
The init process of checkmk should go through initializing the directory /omd/sites.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
If doing some adjustments to the command it works, so the selinux problem is special for the volume. Examples are:
with tmpfs instead of volume:
podman run --rm -it --tmpfs /omd/sites/ docker.io/checkmk/check-mk-raw:2.2.0-latest
without volume:
podman run --rm -it docker.io/checkmk/check-mk-raw:2.2.0-latest
with disabled selinux:
podman run --rm -it --security-opt label=disable -v checkmk_sites:/omd/sites/ docker.io/checkmk/check-mk-raw:2.2.0-latest
In addition i also tried to add a custom selinux module generated with
audit2allow -a -M podman_checkmk_policy
. After installing the module, the rootless container works without any issues. To be honest I don't have much experience in selinux, so I do not know if the rule update is fine or if it opens a security whole.The text was updated successfully, but these errors were encountered: