Podman --rootfs path permissions, with permissions attached to --group-add group while using --uidmap/gidmap. #10917
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
I am attempting to create a container using the
--rootfs
option with unprivileged users.I am trying to lock down the permissions to the actual rootfs to specific groups.
For example my rootfs path:
/data/storage/only-group-common/rootfs
I only want
groupCommon
to have access.I use ACL permissions to make sure only
groupCommon
has access.For simplicity here are the users and groups at play:
user1 - 1000
group1 - 1000
groupCommon - 1005
When I start my container I am using the following command:
This fails because only group 1005 has access to the rootfs.
If I add access to group
1000
to the rootfs path of/data/storage/only-group-common
, the container can start.I am wondering if this is expected behavior?
I imagine that the
group-add
option happens after the podman attempts to access therootfs
?I am wondering if I can get a better understanding on what happens here?
Is it possible to have the
group-add
step occur before podman accesses the rootfs?Steps to reproduce the issue:
Describe the results you received:
Error: unable to start container 320250fe6e66db9d7fac4fb35de3adc82d64a52c2ef656b5faa5901d851f371d: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:46: preparing rootfs caused \\\"permission denied\\\"\"": OCI permission denied
Describe the results you expected:
Ideally I want the container to be able to start.
podman info --debug
The text was updated successfully, but these errors were encountered: