How to share data between LXC container

exaveal

New Member
Apr 8, 2025
5
0
1
Hi,

I have one LXC running an nfs server which is storing all media files. All these files belong user www-data.
Then I have a Nextcloud LXC (unprivileged) which shall have read+write access to these files.

I have set up bindmount via NFS on the host. In the host still all files belong to www-data.
Then I set up mount points in the Nextcloud LXC. And here all files belong to nobody.

How do I get it managed, that all files also belong to www-data in the Nextcloud LXC? I just don't get it done and I don't find any tutorial for stupid newbies like me :)
I tried to make a UID remapping as described here: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers#Using_local_directory_bind_mount_points

But after this, the container Nextcloud LCX does not start anymore:
Code:
()
lxc_map_ids: 245 newuidmap failed to write mapping "newuidmap: uid range [33-34) -> [33-34) not allowed": newuidmap 3625 0 100000 32 33 33 1 34 100034 64530
lxc_spawn: 1795 Failed to set up id mapping.
TASK ERROR: startup for container '101' failed

So ... I do not have any idea how to go on. How can I share data between LXCs with handling user rights for read&write?