mirror of https://github.com/containers/podman.git
docs: document when a volume is chowned
add documentation to clarify when a volume is chowned. Closes: https://github.com/containers/podman/issues/26474 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
5cbd47b45c
commit
f266034d56
|
@ -54,10 +54,25 @@ See examples.
|
||||||
|
|
||||||
`Chowning Volume Mounts`
|
`Chowning Volume Mounts`
|
||||||
|
|
||||||
By default, Podman does not change the owner and group of source volume
|
When a named volume is first mounted to a container, Podman
|
||||||
directories mounted into containers. If a <<container|pod>> is created in a new
|
automatically adjusts the ownership of the volume's mount point during
|
||||||
user namespace, the UID and GID in the container may correspond to another UID
|
container initialization. This chown operation occurs under the
|
||||||
and GID on the host.
|
following conditions:
|
||||||
|
|
||||||
|
- The volume was not used yet (has `NeedsChown` set to true)
|
||||||
|
- The volume is empty or has not been copied up yet
|
||||||
|
- The volume is not managed by an external volume driver
|
||||||
|
- The volume driver is not "image"
|
||||||
|
|
||||||
|
For volumes with idmapped mounts (using the `idmap` option), the
|
||||||
|
ownership change takes into account the container's user namespace
|
||||||
|
mappings, but the idmapped volume retains proper UID/GID mapping. For
|
||||||
|
volumes without idmapping, the mount point is chowned to match the
|
||||||
|
container's process user and group, mapped to the host user namespace
|
||||||
|
if user namespace remapping is enabled.
|
||||||
|
|
||||||
|
If a <<container|pod>> is created in a new user namespace, the UID and
|
||||||
|
GID in the container may correspond to another UID and GID on the host.
|
||||||
|
|
||||||
The `:U` suffix tells Podman to use the correct host UID and GID based on the
|
The `:U` suffix tells Podman to use the correct host UID and GID based on the
|
||||||
UID and GID within the <<container|pod>>, to change recursively the owner and
|
UID and GID within the <<container|pod>>, to change recursively the owner and
|
||||||
|
|
Loading…
Reference in New Issue