In nginx
podman container nginx
user is used to run nginx
server.
On the host machine ls -alh
:
drwxrwx--- 2 myuser myuser 4.0K Aug 10 22:23 .
drwxrwx--- 3 myuser myuser 4.0K Aug 10 22:59 ..
-rw-rw---- 1 myuser myuser 46 Aug 10 22:24 .htpasswd
The same folder inside container ls -alh
:
drwxrwx--- 2 root root 4.0K Aug 10 22:23 .
drwxr-xr-x 1 root root 4.0K Aug 10 11:05 ..
-rw-rw---- 1 root root 46 Aug 10 22:24 .htpasswd
nginx
user inside container can't access .htpasswd
because of o-rwx
.
Question: what is the commonly used pattern to handle this kind of cases in rootless container universally? Maybe it is possible to create group (used later as file-group owner) which gathers all ranges from subuid
/subgid
for particular host user - but how to achieve this?