Cant get lxc idmap to work

DoorTruck

New Member
Feb 13, 2025
11
0
1
I am trying to get my docker containers running in LXC container with Portainer to access my docker-host folder with all the configs placed in /docker-host/ on the Proxmox Host

The files have the following rights
Code:
root@proxmox:/docker-mounts# ls -ld
drwxr-xr-x 16 root root 4096 Aug 20 10:36 .
root@proxmox:/docker-mounts# ls -ld audiobookshelf/
drwxr-xr-x 3 root root 4096 Aug 20 10:33 audiobookshelf/
root@proxmox:/docker-mounts# cd audiobookshelf/
root@proxmox:/docker-mounts/audiobookshelf# ls
absdatabase.sqlite  migrations
root@proxmox:/docker-mounts/audiobookshelf# ls -ld audiobookshelf/
ls: cannot access 'audiobookshelf/': No such file or directory
root@proxmox:/docker-mounts/audiobookshelf# ls -ld
drwxr-xr-x 3 root root 4096 Aug 20 10:33 .
root@proxmox:/docker-mounts/audiobookshelf# ls -ld absdatabase.sqlite
-rwxr-xr-x 1 root root 16932864 Aug 20 10:33 absdatabase.sqlite
root@proxmox:/docker-mounts/audiobookshelf#

In my LXC containers /etc/pve/lxc/101.conf I have the following ID map setup
Code:
lxc.idmap: u 0 100000 1000
lxc.idmap: u 1000 1000 2000
lxc.idmap: u 65534 165534 1
lxc.idmap: g 0 100000 100
lxc.idmap: g 100 100 1
lxc.idmap: g 101 100100 899
lxc.idmap: g 1000 1000 2000

In portainer the PUID and PGID are set to 1029 and 100

But all my containers fail to read from any of those foldes with errors like
original: [Error: SQLITE_READONLY: attempt to write a readonly database] {
Starting Plex Media Server. . . (you can ignore the libusb_init error)
PMS: failure detected. Read/write access is required for path: /config/Library/Application Support/Plex Media Server

Am I missing some more idmapping?
 
Last edited: