'podman run' and the '--privileged' option | No authentication required; was that intentional?
#28881
-
|
Hello. As I can deduce from the manual podman-run(1), an unprivileged user is allowed to execute ' |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
It is unclear what you are asking? A container running as your user will never have more permissions than your user even when using --privileged
you may want to read up on how user namespaces work, because uid 0 in the container does not give you real root access on the host. |
Beta Was this translation helpful? Give feedback.
-
|
This is intentional and by design. The When running rootless Podman, user IDs inside the container are mapped to unprivileged UIDs on the host via user namespaces. So The docs confirm this directly:
The For comparison, this is fundamentally different from |
Beta Was this translation helpful? Give feedback.
This is intentional and by design. The
rootyou 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 touid=1000(yk)outside of it. If the container process escapes, it gets no elevated privileges on the host.The docs confirm this directly:
The
--volume /:/mntmount 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…