Skip to content
Discussion options

You must be logged in to vote

This is intentional and by design. The root you see inside the container is not real root on the host.

When running rootless Podman, user IDs inside the container are mapped to unprivileged UIDs on the host via user namespaces. So uid=0(root) inside the container maps back to uid=1000(yk) outside of it. If the container process escapes, it gets no elevated privileges on the host.

The docs confirm this directly:

Rootless containers cannot have more privileges than the account that launched them.

The --volume /:/mnt mount does expose the host filesystem, but only with the same permissions your user already has. Try writing to a root-owned file from inside that container and it will be den…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Ricky-Tigg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants