How to allow a container to access files of some host group? Permission problem. #24379
-
Hi, The Problem
What I tried
Nothing worked. Please help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Examples of my tries: photoprism@home$ podman run --rm -ti -v /home/Photos:/photos --group-add keep-groups --gidmap 'g0:1007,g1004:1004' busybox sh
WARN[0000] Additional gid=10 is not present in the user namespace, skip setting it
/ # id
uid=0(root) gid=0(root) groups=65534(nobody),65534(nobody) photoprism@home$ podman run --rm -ti -v /home/Photos:/photos --group-add keep-groups --gidmap 'g524388:1004,g524288:1007' busybox sh
Error: creating container storage: creating an ID-mapped copy of layer "58f32e9504c8eb248292326a1975174b0560f7a3ad1b75880b9571c4eb7144a0": creating copy of template layer "58f32e9504c8eb248292326a1975174b0560f7a3ad1b75880b9571c4eb7144a0" with ID "c365f1dcf9b1c6402879df78f86896959d5632b9ecb1a604897b0082aeabc729": container ID 0 cannot be mapped to a host ID |
Beta Was this translation helpful? Give feedback.
-
Solution
|
Beta Was this translation helpful? Give feedback.
Solution
Add another mapping to
/etc/subgid
for the extra group:Run the container with:
Same but for the
docker-compose
file: