podman cp
creates files in container only as root user
#9626
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman cp
creates files in container as root user. When container is created with options--userns
--user
files kept the uid from host system prior to v3.Steps to reproduce the issue:
(shell 1) podman run --rm -u $(id -u) --userns=keep-id -it registry.opensuse.org/opensuse/leap
(shell 2) podman cp $XAUTHORITY CONTAINERID:/tmp/.Xauthority
(shell 1) cat /tmp/.Xauthority
Describe the results you received:
cat: /tmp/.Xauthority: Permission denied
Describe the results you expected:
File is accessible.
Additional information you deem important (e.g. issue happens only occasionally):
Rootless.
Used to work until v2.2.1.
Tried
podman unshare podman mount
but mount point was empty?!Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: