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
{{ message }}
Repository navigation
bind mount source under a root-only directory fails with EACCES in a user namespace (follow-up to #3719) #3942
Currently, youki may fail to bind mount a source path that is inaccessible from within the container's user namespace, such as a root-owned directory with mode 0700.
This is because rootfs preparation is performed by the init process after it has entered the container's user namespace. At this point, the init process no longer has the privileges of root in the host's user namespace.
This issue is not specific to idmapped mounts.
Steps to Reproduce
$ sudo podman --runtime youki run --rm --uidmap 0:100000:65536 --gidmap 0:100000:65536 docker.io/library/busybox id
Error: youki: Error: failed to create container: intermediate process error EPERM: Operation not permitted: OCI permission denied
Expectation
Rootful containers using a user namespace should support authorized bind mounts.
Additional Context 1
I tested running a Kubernetes Pod with hostUsers: false using youki with the changes from #3719. However, the Pod failed to start, and the issue described above appears to be related to this failure.
Additional Context 2
We need to extend the create_idmapped_mount_fd introduced in #3719 to support regular bind mounts as well.
Activity