From d4272bed51e2060d431ad042e803770e4d2fe64e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 1 Jun 2022 15:20:46 +0200 Subject: podman cp: do not overwrite non-dirs with dirs and vice versa Add a new `--overwrite` flag to `podman cp` to allow for overwriting in case existing users depend on the behavior; they will have a workaround. By default, the flag is turned off to be compatible with Docker and to have a more sane behavior. Fixes: #14420 Signed-off-by: Valentin Rothberg --- docs/source/markdown/podman-cp.1.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/source/markdown/podman-cp.1.md b/docs/source/markdown/podman-cp.1.md index 0c375675d..bb86e3f13 100644 --- a/docs/source/markdown/podman-cp.1.md +++ b/docs/source/markdown/podman-cp.1.md @@ -63,6 +63,10 @@ When set to true, files copied to a container will have changed ownership to the When set to false, maintain uid/gid from archive sources instead of changing them to the primary uid/gid of the destination container. The default is **true**. +#### **--overwrite** + +Allow directories to be overwritten with non-directories and vice versa. By default, `podman cp` errors out when attempting to overwrite, for instance, a regular file with a directory. Use this option, if you want to allow this behavior. + ## ALTERNATIVES Podman has much stronger capabilities than just `podman cp` to achieve copying files between the host and containers. -- cgit v1.2.3-54-g00ecf