Closed
Description
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Volumes are always owned by root instead of inheriting owner and group from the host.
Steps to reproduce the issue:
- Run
podman run --rm -v "$HOME:$HOME" alpine ls -l "$HOME/.."
total 4
drwx------ 35 root root 4096 Apr 11 07:55 fnkr
- Run
podman run --rm -v "$HOME:$HOME" --user "$(id -u):$(id -g)" alpine ls -l "$(dirname $HOME)"
total 4
drwx------ 35 root root 4096 Apr 11 07:55 fnkr
Describe the results you received:
The mount is owned by root.
Describe the results you expected:
The mount should be owned by the current user in both cases. (At least this is what Docker does.)
➜ docker run --rm -v "$HOME:$HOME" alpine ls -l "$HOME/.."
total 4
drwx------ 35 1001 1001 4096 Apr 11 08:01 fnkr
➜ docker run --rm -v "$HOME:$HOME" --user "$(id -u):$(id -g)" alpine ls -l "$(dirname $HOME)"
total 4
drwx------ 35 1001 1001 4096 Apr 11 08:01 fnkr
Additional information you deem important (e.g. issue happens only occasionally):
100% reproducible. Probably related to #2643 and #2634.
Output of podman version
:
➜ podman version
Version: 1.2.0
RemoteAPI Version: 1
Go Version: go1.11.5
OS/Arch: linux/amd64
Output of podman info --debug
:
debug:
compiler: gc
git commit: ""
go version: go1.11.5
podman version: 1.2.0
host:
BuildahVersion: 1.7.2
Conmon:
package: podman-1.2.0-2.git3bd528e.fc29.x86_64
path: /usr/libexec/podman/conmon
version: 'conmon version 1.12.0-dev, commit: d88bb0e63cb70f9787a8e410716924f380af361f'
Distribution:
distribution: fedora
version: "29"
MemFree: 10356088832
MemTotal: 25145073664
OCIRuntime:
package: runc-1.0.0-68.dev.git6635b4f.fc29.x86_64
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc6+dev
commit: ef9132178ccc3d2775d4fb51f1e431f30cac1398-dirty
spec: 1.0.1-dev
SwapFree: 0
SwapTotal: 0
arch: amd64
cpus: 8
hostname: ping
kernel: 5.0.6-200.fc29.x86_64
os: linux
rootless: true
uptime: 1h 54m 36.7s (Approximately 0.04 days)
insecure registries:
registries: []
registries:
registries:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
store:
ConfigFile: /home/fnkr/.config/containers/storage.conf
ContainerStore:
number: 1
GraphDriverName: overlay
GraphOptions:
- overlay.mount_program=/usr/bin/fuse-overlayfs
GraphRoot: /home/fnkr/.local/share/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 26
RunRoot: /run/user/1001
VolumePath: /home/fnkr/.local/share/containers/storage/volumes
Additional environment details (AWS, VirtualBox, physical, etc.):
I'm using Fedora Workstation 29.