Skip to content

Conversation

scadu
Copy link
Contributor

@scadu scadu commented May 26, 2025

Add :Z SELinux label to volume mounts to ensure proper security context
for mounted files, allowing the container to execute the Ruby script.
This fixes an issue with SELinux-enabled environments (e.g. Fedora, Red Hat, Oracle Linux) without impacting other systems (tested against Debian 12).

Labeling systems like SELinux require that proper labels are placed on volume content mounted into a <<container|pod>>. Without a label, the security system might prevent the processes running inside the <<container|pod>> from using the content. By default, Podman does not change the labels set by the OS.[1]

  1. https://docs.podman.io/en/v4.4/markdown/options/volume.html#Footnote1

Fixes #257

Labeling systems like SELinux require that proper labels are placed on volume content mounted into a <<container|pod>>. Without a label, the security system might prevent the processes running inside the <<container|pod>> from using the content. By default, Podman does not change the labels set by the OS.[1]

1. https://docs.podman.io/en/v4.4/markdown/options/volume.html#Footnote1
@scadu scadu marked this pull request as ready for review May 27, 2025 09:12
@scadu scadu requested a review from a team as a code owner May 27, 2025 09:12
@scadu scadu changed the title Fix permission denied error in Docker container on SELinux systems Fix permission denied error in container on SELinux systems May 27, 2025
@scadu scadu merged commit 906eeb6 into master May 27, 2025
1 check passed
@scadu scadu deleted the sup-3930-junit-plugin-257-permission-denied-error-on-srcbinannotate branch May 27, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission denied error on /src/bin/annotate when running plugin in container
2 participants