You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
podman still chowns the volume to the containers uid/gid though which causes the container to not be able to use it
The fix for said issue (#16739), only disable chowing if the volume does not exist, but if the volume is created prior to starting the container (e.g. with podman volume create), the volume is chowned and the permissions are wrong.
Unfortunately, the fix (#21611) does not work if the container-dir does not exist in the container.
Steps to reproduce the issue
Steps to reproduce the issue
Run podman volume create test (as root)
Run podman run --rm --userns=auto -v test:/test:idmap archlinux touch /test/123 (as root)
Describe the results you received
The process is unable to create the file, due to wrong permissions.
host:
arch: amd64buildahVersion: 1.35.1cgroupControllers:
- cpuset
- cpu
- io
- memory
- hugetlb
- pids
- rdma
- misccgroupManager: systemdcgroupVersion: v2conmon:
package: /usr/bin/conmon is owned by conmon 1:2.1.10-1path: /usr/bin/conmonversion: 'conmon version 2.1.10, commit: 2dcd736e46ded79a53339462bc251694b150f870'cpuUtilization:
idlePercent: 87.44systemPercent: 2.8userPercent: 9.76cpus: 8databaseBackend: boltdbdistribution:
distribution: archversion: unknowneventLogger: journaldfreeLocks: 2043hostname: fooidMappings:
gidmap: nulluidmap: nullkernel: 6.7.9-arch1-1linkmode: dynamiclogDriver: journaldmemFree: 2308268032memTotal: 16627310592networkBackend: netavarknetworkBackendInfo:
backend: netavarkdns:
package: Unknownpackage: /usr/lib/podman/netavark is owned by netavark 1.10.3-1path: /usr/lib/podman/netavarkversion: netavark 1.10.3ociRuntime:
name: crunpackage: /usr/bin/crun is owned by crun 1.14.4-1path: /usr/bin/crunversion: |- crun version 1.14.4 commit: a220ca661ce078f2c37b38c92e66cf66c012d9c1 rundir: /run/user/1000/crun spec: 1.0.0 +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJLos: linuxpasta:
executable: /usr/bin/pastapackage: /usr/bin/pasta is owned by passt 2024_03_26.4988e2b-1version: | pasta 2024_03_26.4988e2b Copyright Red Hat GNU General Public License, version 2 or later <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.remoteSocket:
exists: falsepath: /run/podman/podman.socksecurity:
apparmorEnabled: falsecapabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOTrootless: falseseccompEnabled: trueseccompProfilePath: /etc/containers/seccomp.jsonselinuxEnabled: falseserviceIsRemote: falseslirp4netns:
executable: /usr/bin/slirp4netnspackage: /usr/bin/slirp4netns is owned by slirp4netns 1.2.3-1version: |- slirp4netns version 1.2.3 commit: c22fde291bb35b354e6ca44d13be181c76a0a432 libslirp: 4.7.0 SLIRP_CONFIG_VERSION_MAX: 4 libseccomp: 2.5.5swapFree: 3983962112swapTotal: 4294963200uptime: 389h 8m 30.00s (Approximately 16.21 days)variant: ""plugins:
authorization: nulllog:
- k8s-file
- none
- passthrough
- journaldnetwork:
- bridge
- macvlan
- ipvlanvolume:
- localregistries: {}store:
configFile: /etc/containers/storage.confcontainerStore:
number: 0paused: 0running: 0stopped: 0graphDriverName: overlaygraphOptions:
overlay.mountopt: nodevgraphRoot: /var/lib/containers/storagegraphRootAllocated: 157393113088graphRootUsed: 146208415744graphStatus:
Backing Filesystem: extfsNative Overlay Diff: "false"Supports d_type: "true"Supports shifting: "true"Supports volatile: "true"Using metacopy: "true"imageCopyTmpDir: /var/tmpimageStore:
number: 2runRoot: /run/containers/storagetransientStore: falsevolumePath: /var/lib/containers/storage/volumesversion:
APIVersion: 5.0.0Built: 1711060217BuiltTime: Thu Mar 21 23:30:17 2024GitCommit: e71ec6f1d94d2d97fb3afe08aae0d8adaf8bddf0-dirtyGoVersion: go1.22.1Os: linuxOsArch: linux/amd64Version: 5.0.0
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
N/A
Additional information
I noticed this while trying to use the "new" :idmap option (as described in #16250) with gitlab-runner, which creates the volumes first and then uses them (and apparently the container-dir does not exist in the container).
The text was updated successfully, but these errors were encountered:
if the volume is mounted with "idmap", there should not be any mapping
using the user namespace mappings since this is done at runtime using
the "idmap" kernel feature.
Closes: containers#22228
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Issue Description
Same as #21608:
Unfortunately, the fix (#21611) does not work if the container-dir does not exist in the container.
Steps to reproduce the issue
Steps to reproduce the issue
podman volume create test
(asroot
)podman run --rm --userns=auto -v test:/test:idmap archlinux touch /test/123
(asroot
)Describe the results you received
The process is unable to create the file, due to wrong permissions.
Describe the results you expected
The process being able to create the file.
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
N/A
Additional information
I noticed this while trying to use the "new"
:idmap
option (as described in #16250) withgitlab-runner
, which creates the volumes first and then uses them (and apparently the container-dir does not exist in the container).The text was updated successfully, but these errors were encountered: