Help with UID/GID Mapping Between CTs

Pragma808

Active Member
Nov 19, 2018
27
1
43
36
I'm having some trouble mapping the UID/GIDs between two LXC containers: plex and deluge.

Here are the configs:

Plex CT:
Code:
# UID mapping, plex uid is 998
lxc.idmap: u 0 100000 998
lxc.idmap: u 998 1234 1
lxc.idmap: u 999 100999 63536
# GID mapping, plex gid is 998
lxc.idmap: g 0 100000 998
lxc.idmap: g 998 1234 1
lxc.idmap: g 999 100999 63536

Deluge CT:
Code:
# UID mapping, deluge uid is 998
lxc.idmap: u 0 100000 109
lxc.idmap: u 109 1234 1
lxc.idmap: u 110 100110 64425
# GID mapping, deluge gid is 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: g 1000 1234 1
lxc.idmap: g 1001 101001 63534

/etc/subuid
Code:
root:100000:65536
root:1234:1

/etc/subgid
Code:
root:100000:65536
root:1234:1

I'm able to start the containers, but the applications themselves fail to start their systemd processes.

Code:
root@plex-test:~# systemctl status plexmediaserver.service 
* plexmediaserver.service - Plex Media Server
     Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-02-21 22:43:38 UTC; 46s ago
    Process: 312 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_>
    Process: 314 ExecStart=/bin/sh -c  export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )";  export P>
   Main PID: 314 (code=exited, status=1/FAILURE)
        CPU: 20ms

Feb 21 22:43:38 plex-test systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Feb 21 22:43:38 plex-test systemd[1]: Stopped Plex Media Server.
Feb 21 22:43:38 plex-test systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Feb 21 22:43:38 plex-test systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Feb 21 22:43:38 plex-test systemd[1]: Failed to start Plex Media Server.

I suspect I do not fully grasp what the mapping entries I've added to configs are doing. My goal is for files that are created by deluged to be accessible in plex without having to chmod/chown the files every time.

Any assistance is appreciated. Thank you!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!