From d01cd40196eb18d859b3c416505ceb1d4ba398ac Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 13 Feb 2017 19:24:01 +0100 Subject: machined: when copying files from/to userns containers chown to root This changes the file copy logic of machined to set the UID/GID of all copied files to 0 if the host and container do not share the same user namespace. Fixes: #4078 --- man/machinectl.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'man') diff --git a/man/machinectl.xml b/man/machinectl.xml index 38cf919a78..b96aea1a48 100644 --- a/man/machinectl.xml +++ b/man/machinectl.xml @@ -540,9 +540,12 @@ system into a running container. Takes a container name, followed by the source path on the host and the destination path in the container. If the destination path is omitted, the - same as the source path is used. - + same as the source path is used. + If host and container share the same user and group namespace, file ownership by numeric user ID and + group ID is preserved for the copy, otherwise all files and directories in the copy will be owned by the root + user and group (UID/GID 0). + copy-from NAME PATH [PATH] @@ -551,7 +554,11 @@ into the host system. Takes a container name, followed by the source path in the container the destination path on the host. If the destination path is omitted, the same as the source path - is used. + is used. + + If host and container share the same user and group namespace, file ownership by numeric user ID and + group ID is preserved for the copy, otherwise all files and directories in the copy will be owned by the root + user and group (UID/GID 0). -- cgit v1.2.3-54-g00ecf