Comment on Proxmox: Trouble with permissions with a a mountpoint in a lxc "audiobookshelf"
tvcvt@lemmy.ml 3 months ago
I’m making some assumptions, namely that you’re using an unprivileged LXC container and the mount point is a bind mount.
Unprivileged LXC shift user ID numbers so that an escape won’t result in root access to the host. The root user (uid 0) in the container is actually uid 100000 from the perspective of the Proxmox host.
What I usually do is set ownership of my bind mounts to that high-numbered ID (so something like chown -R 100000:100000 /path/to/bind/mount
) from Proxmox. Then the root user in the container will be able to set whatever permissions you need directly.
moddy@feddit.org 3 months ago
This is the way i will go! Especially when i have a mounted directory in several different lxc’s i just have to chown it this way for one time.
Thank you!
PS: I hope you can read my answer, because i do see your post only in my inbox. The thread seems almost empty. Guess it has to do with my feddit.org-account.
tvcvt@lemmy.ml 3 months ago
Awesome. I’m glad it helps. I’d be a little weary of using the same directory in multiple containers. File systems may or may not behave well with multiple machines writing to them. Not saying anything bad will happen, but do keep an eye out for issues.