On 2/18/21 03:03, Peter Upfold wrote:
Hello,
I'm struggling a little 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.
I've seen similar issues on this list: Daniel Walsh's suggestion of
`--annotation run.oci.keep_original_groups=1` seems to work
beautifully to change the ownership of the volume folder in the
container to be windowsnoob:windowsnoob, as I would want it, _if_ I'm
doing `podman run`.
Note the annotation does not change the ownership of the folder, it just
allows the group access for your non root process to leak into the
container. Allowing you to have group access to the volume.
However, I'm trying to create a pod as follows. Is it possible to
have
this permissions configuration work in this scenario?
podman pod create -n windowsnoob -p 8081
podman build -t windowsnoob-fpm .
podman create --name windowsnoob-fpm --pod windowsnoob -v
/var/www/html/websites/windows:/var/www/html/websites/windows:Z,noexec,nodev,rw
windowsnoob-fpm
podman pod start windowsnoob
At the moment, doing this and checking the permissions on the
/var/www/html/websites/windows volume in the created container (via
`podman exec -it [container] bash`) still shows the following:
drwxr-xr-x. 2 root nobody 28 Feb 14 09:45 windows
This should be the same, but the container you create within the pod
will need the annotation.
(Note that I can write to a subfolder already owned by
windowsnoob:windowsnoob _inside_ the volume just fine — I don't
believe this is an SELinux issue, or a permissions issue on anywhere
except the top level of the volume mount!)
Thank you for any insight you might be able to provide!
Peter Upfold
_______________________________________________
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io