How to mount dir accessed via supplemental group as overlay volume mount? (Rootless Podman) #19408
-
I have a directory on the host machine that I access via a supplemental group, and I would like to mount this directory into a container with an overlay volume mount. This is essentially the setup (host):
I can mount this successfully with a regular bind mount: However, I need the changes in the container to not affect the host machine, so I try to mount as an overlay volume mount:
It seemed strange to me that I am able to cd into /host, but not /host/d1. I have also tried disabling SELinux labeling( The host is a RHEL8 machine at my work, and I don't have admin rights, so rootless podman. Host:
I am fairly new to working with containers, so I don't know if I am missing some configuration or run option, or this can't be done. Alternatively, if there is a better way to access this dir and not have changes in the container affect the host machine, I would love to know about it. Any help is apprecated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Weird, I think you need to look under the covers to see the ownership of the overlay group. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
that is a security measure in the kernel to prevent accessing files not owned by IDs not in the user namespace. We have no control whether it can be relaxed or not, it happens entirely in the kernel. One possibility could be to use fuse-overlayfs, as this check is not in place (it doesn't need that since it is anyway running as an unprivileged process)