[pve-devel] [PATCH common/container 0/2] inherit attributes from preexisting directory during mountpoint setup
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Dec 17 14:17:27 CET 2025
Filip Schauer <f.schauer at proxmox.com> writes:
> Make mount points inherit the uid, gid, and access mode if the directory
> already exists in the container file system. This makes setting up mount
> points more convenient when attributes different from uid=0, gid=0,
> mode=755 are required.
>
> As an example, this ensures that directories like /app/data and
> /app/cache in the docker.io/weblate/weblate OCI image retain the correct
> permissions when adding mount points over them.
>
> While not explicitly specified by the OCI spec, this matches the
> behaviour of implementations such as Docker and Podman.
>
> Also add the fchmodat syscall, which is required to set the access mode
> of a file descriptor that was obtained with open_tree.
>
> pve-common:
>
> Filip Schauer (1):
> tools: add fchmodat syscall
>
> src/PVE/Syscall.pm | 1 +
> src/PVE/Tools.pm | 11 +++++++++++
> 2 files changed, 12 insertions(+)
>
>
> pve-container:
>
> Filip Schauer (1):
> mountpoint_insert_staged: inherit attributes if directory already
> exists
>
> src/PVE/LXC.pm | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>
> Summary over all repositories:
> 3 files changed, 19 insertions(+), 0 deletions(-)
When used in conjunction with [1] this allows to run the weblate/weblate
image without errors. I also tested this with syncthing/syncthing and it
looks good.
[1] https://lore.proxmox.com/all/20251215174203.267293-1-f.schauer@proxmox.com/
Tested-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
--
Maximiliano
More information about the pve-devel
mailing list