Skip to content

Plex won't start if config folder includes a symlinked file #369

Closed as not planned
@strass

Description

@strass

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I co-locate my docker-compose file alongside the /config file in the plex image (/opt/config/plex:/config:rw). For organizational purposes I've recently started symlinking my source of truth from a git repository into the config directory so that changes are propagated automatically.

Since doing that I have begun seeing this error on container startup:

plex  | chown: cannot dereference '/config/docker-compose.yml': No such file or directory
plex  | s6-rc: warning: unable to start service init-plex-chown: command exited 1

Expected Behavior

I would expect that the chown script can deal with symlinked files and won't prevent plex startup.

Steps To Reproduce

Bind the /config folder in the container to a directory in your host that contains your docker-compose file
Symlink the docker-compose file in from another directory
Start container

Environment

- OS: flatcar stable
- How docker service was installed: flatcar defaults

CPU architecture

x86-64

Docker creation

---
version: "3"
services:
  plex:
    container_name: "plex"
    entrypoint:
      - "/init"
    environment:
      - "PUID=1000"
      - "PGID=1000"
      - "VERSION=docker"
      - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      - "HOME=/root"
      - "LANGUAGE=en_US.UTF-8"
      - "LANG=en_US.UTF-8"
      - "TERM=xterm"
      - "NVIDIA_VISIBLE_DEVICES=all"
      - "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility"
      - "DEBIAN_FRONTEND=noninteractive"
      - "PLEX_DOWNLOAD=https://downloads.plex.tv/plex-media-server-new"
      - "PLEX_ARCH=amd64"
      - "PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/config/Library/Application Support"
      - "PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver"
      - "PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6"
      - "PLEX_MEDIA_SERVER_USER=abc"
      - "PLEX_MEDIA_SERVER_INFO_VENDOR=Docker"
      - "PLEX_MEDIA_SERVER_INFO_DEVICE=Docker Container (LinuxServer.io)"
    image: "lscr.io/linuxserver/plex:latest"
    restart: "unless-stopped"
    volumes:
      - "/opt/config/plex:/config" # !!! this one
      - "/mnt/storage/video/tv:/tv"
    network_mode: host

Container logs

plex  | ───────────────────────────────────────
plex  |
plex  |
plex  |       ██╗     ███████╗██╗ ██████╗
plex  |       ██║     ██╔════╝██║██╔═══██╗
plex  |       ██║     ███████╗██║██║   ██║
plex  |       ██║     ╚════██║██║██║   ██║
plex  |       ███████╗███████║██║╚██████╔╝
plex  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
plex  |
plex  |
plex  |    Brought to you by linuxserver.io
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | To support LSIO projects visit:
plex  | https://www.linuxserver.io/donate/
plex  |
plex  |
plex  | ───────────────────────────────────────
plex  | GID/UID
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | User UID:    1000
plex  | User GID:    1000
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | chown: cannot dereference '/config/docker-compose.yml': No such file or directory
plex  | s6-rc: warning: unable to start service init-plex-chown: command exited 1
plex  | [migrations] started
plex  | [migrations] no migrations found

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions