linuxserver / docker-jellyfin

GNU General Public License v3.0
600 stars 92 forks source link

[BUG] Jellyfin container not adopting set PUID/PGID values #245

Closed sotiris-bos closed 1 month ago

sotiris-bos commented 1 month ago

Is there an existing issue for this?

Current Behavior

I have set custom PUID/PGID values in my docker compose file so that jellyfin has proper access to my media.

The jellyfin user inside the container runs under a different UID/GID.

Expected Behavior

The jellyfin user should adopt the UID/GID values set in the docker compose file, exactly as it happens with the plex container.

Steps To Reproduce

Arch Linux 6.6.30-2-lts Docker version 26.1.2

Environment

- OS: Arch Linux 6.6.30-2-lts
- How docker service was installed: Docker was installed through pacman package manager. docker-compose pull was used to pull the image.

Docker compose file:

---
version: "2.1"
services:
  jellyfin:
    image: linuxserver/jellyfin
    container_name: jellyfin
    network_mode: none
    runtime: nvidia
    environment:
      - PUID=355
      - PGID=8675309
      - TZ=Europe/Athens
#      - UMASK_SET=022 #optional
      - pipework_cmd=--direct-phys eno1v28 -i eno1v28 @CONTAINER_NAME@ udhcpc
      - pipework_cmd_2=--direct-phys eno1v33.400 -i eno1v33.400 @CONTAINER_NAME@ udhcpc
      - NVIDIA_VISIBLE_DEVICES=all
    volumes:
      - /var/lib/docker/volumes/jellyfin2/config:/config
      - /mnt/media:/media

### CPU architecture

x86-64

### Docker creation

```bash
docker-compose -f docker-compose.yml up -d

Container logs

docker logs jellyfin
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Jellyfin: https://opencollective.com/jellyfin

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    355
User GID:    8675309
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[19:02:30] [INF] [1] Main: Jellyfin version: 10.9.1
[19:02:30] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_DATA_DIR, /config/data]"]
[19:02:30] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[19:02:30] [INF] [1] Main: Operating system: Ubuntu 22.04.4 LTS
[19:02:30] [INF] [1] Main: Architecture: X64
[19:02:30] [INF] [1] Main: 64-Bit Process: True
[19:02:30] [INF] [1] Main: User Interactive: True
[19:02:30] [INF] [1] Main: Processor count: 32
[19:02:30] [INF] [1] Main: Program data path: /config/data
[19:02:30] [INF] [1] Main: Log directory path: /config/log
[19:02:30] [INF] [1] Main: Config directory path: /config
[19:02:30] [INF] [1] Main: Cache path: /config/cache
[19:02:30] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[19:02:30] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[19:02:31] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
[19:02:32] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
docker exec -it jellyfin bash
root@b3abb2021b76:/# id jellyfin
uid=101(jellyfin) gid=102(jellyfin) groups=102(jellyfin),44(video)
github-actions[bot] commented 1 month ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

aptalca commented 1 month ago

You're checking the id of the wrong user. It runs as user abc

sotiris-bos commented 1 month ago

You're checking the id of the wrong user. It runs as user abc

You are right. I thought I had a permission issue but it turns out that I am having a different issue right now.

Closing