Apologies if it is bad etiquette to "bump" my previous issue on this!
I continue to struggle with the permissions set on the top level
directory of a volume that is mounted in a rootless container.
My Containerfile:
https://gist.github.com/PeterUpfold/2f63ad5341ffd9079bc2683a5bb2744c
The top level directory of the volume mount,
/var/www/html/websites/windows, ends up with root:nobody and 0755
permissions inside the container.
The suggestion to address this was to add the annotation for
"keep_original_groups" when creating the container in the pod. Creating
as follows:
`podman create --name windowsnoob-fpm --annotation
run.oci.keep_original_groups=1 --pod windowsnoob -v
/var/www/html/websites/windows:/var/www/html/websites/windows:Z,noexec,nodev,rw
windowsnoob-fpm`
still leaves me with root:nobody ownership in the container.
The annotation does appear if I `podman inspect` the created container.
(I'm not actually concerned about group membership here, as the
directory on the host is owned by the user creating this container --
it's just that I'd like the ownership of the mounted volume inside the
container to also be a non-root user; the `oci.keep_original_groups`
solution did work to achieve this in the `podman run` scenario.)
Peter Upfold