Skip to content

fix: Add permissions to modify mounted files when using SELinux #9192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bkmgit
Copy link
Contributor

@bkmgit bkmgit commented Jul 19, 2025

doc: Document how to use Podman with docker-compose

closes #9179

doc: Document how to use Podman with docker-compose
Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running with full privileges feels like an undesirable application of a sledgehammer, and is not recommended practice (see the warning box in the linked section). Can the problem you're encountering be solved with a more limited grant?

Also, are you sure the issue you have is an SELinux issue and not a UID mismatch? We have so far been able to resolve permissions issues by coordinating UIDs between the container and host.

@bkmgit
Copy link
Contributor Author

bkmgit commented Jul 20, 2025

UID and GID are matched from https://github.com/ietf-tools/datatracker/blob/main/docker/run#L59-L64

The recommended action is to map the volumes with :Z or :z see for example https://developers.redhat.com/articles/2025/04/11/my-advice-selinux-container-labeling

however changing

        volumes:
            - postgresdb-data:/var/lib/postgresql/data:z

in https://github.com/ietf-tools/datatracker/blob/main/docker-compose.yml#L42-L43 to

        volumes:
            - postgresdb-data:/var/lib/postgresql/data:z

does not work. Will check if installing docker-compose manually helps rather than using the package manager as it seems a similar issue is obtained for lando/lando#3343

@rjsparks rjsparks marked this pull request as draft July 23, 2025 14:05
@rjsparks
Copy link
Member

Moving this to draft while Jennifer and Benson continue the conversation

@jennifer-richards
Copy link
Member

To continue the conversation: I'm curious what you find relative to your last message, @bkmgit. When I get a moment to set up a system to poke at SELinux myself I'd be happy to try to assist. That'll be ~ next week.

If it looks like it's not going to work with a narrower permissions grant, maybe we can set up an option to the docker/run script or otherwise allow the privileged option to be enabled for users who need it.

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.

Add instructions for local setup using Podman
3 participants