Can't delete files from the web UI

I have a synology NAS where I store my media files.

However, Plex doesn’t work well when the configuration/library (not the media files) are on a NAS. So I have my configuration files in my %APPDATA% directory on windows.

When attempting to delete files through the Plex web UI, I get the error that it can’t do it. I assume this is most likely a permissions issue. I have found my synology user and group ID for the user that owns the media files located on the server. If I use those as the PUID and GUID environment variables though, I can then no longer even run Plex in the container as I get the following error.

Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml

Which I assume is now a permissions issue with the container accessing windows directory files.

Is there a workaround to this?

please share your docker compose or docker run, and your full container logs which begin with our ascii logo.

version: "3"
services:
  plex-linuxserver-io:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: bridge
    ports:
      - "32400:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
      - "1900:1900/udp"
      - "32410:32410/udp"
      - "32412:32412/udp"
      - "32413:32413/udp"
      - "32414:32414/udp"
    environment:
      - ADVERTISE_IP=<192.168.x.x>:32400
      - PUID=<UID of synology user>
      - PGID=<GID of synology user>
      - TZ=Etc/GMT-5
      - VERSION=public
    volumes:
      - "${LOCALAPPDATA}/Plex Media Server:/config"
      - containerized-torrentinggit_banana-media:/media
    restart: unless-stopped

volumes:
  containerized-torrentinggit_banana-media:
    external: true

Here are the logs when I use the PID and GID I get from my synology user

[migrations] started
[migrations] no migrations found
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    <synology PID>
User GID:    <synology UID>
───────────────────────────────────────
Change in ownership detected, please be patient while we chown existing files
This could take some time
**** Permissions could not be set. This is probably because your volume mounts are remote or read-only. ****
**** The app may not work properly and we will not provide support for it. ****
**** Server already claimed ****
Attempting to upgrade to: 1.40.0.7998-c29d4c0c8
(Reading database ... 10672 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Docker detected.  Preinstallation validation not required.
Unpacking plexmediaserver (1.40.0.7998-c29d4c0c8) over (1.32.8.7639-fb6452ebf) ...
Setting up plexmediaserver (1.40.0.7998-c29d4c0c8) ...
PlexMediaServer install: Docker detected. Postinstallation tasks not required. Continuing.
[custom-init] No custom files found, skipping...
Starting Plex Media Server. . . (you can ignore the libusb_init error)
/usr/bin/find: unknown predicate `-R'
2024-02-22 03:39:50 URL:https://downloads.plex.tv/plex-media-server-new/1.40.0.7998-c29d4c0c8/debian/plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb [81786462/81786462] -> "/tmp/plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb" [1]
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml
Failed to load preferences at /config/Library/Application Support/Plex Media Server/Preferences.xml

Though it does show the chown permission issue at the top, when I use PUID and GUID of simply 1000 for both it shows that same error at startup, but it works fine; the config loads, I can watch my media and such, I just can’t delete media.

For comparison here are the logs when it’s working with 1000 as the IDs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
Change in ownership detected, please be patient while we chown existing files
This could take some time
**** Permissions could not be set. This is probably because your volume mounts are remote or read-only. ****
**** The app may not work properly and we will not provide support for it. ****
**** Server already claimed ****
Attempting to upgrade to: 1.40.0.7998-c29d4c0c8
(Reading database ... 10672 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Docker detected.  Preinstallation validation not required.
Unpacking plexmediaserver (1.40.0.7998-c29d4c0c8) over (1.32.8.7639-fb6452ebf) ...
Setting up plexmediaserver (1.40.0.7998-c29d4c0c8) ...
PlexMediaServer install: Docker detected. Postinstallation tasks not required. Continuing.
[custom-init] No custom files found, skipping...
Starting Plex Media Server. . . (you can ignore the libusb_init error)
[ls.io-init] done.
Critical: libusb_init failed
/usr/bin/find: unknown predicate `-R'
2024-02-22 03:47:32 URL:https://downloads.plex.tv/plex-media-server-new/1.40.0.7998-c29d4c0c8/debian/plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb [81786462/81786462] -> "/tmp/plexmediaserver_1.40.0.7998-c29d4c0c8_amd64.deb" [1]

well i have no clue what you were trying to put in the compose, the puid and pgid are invalid.
in your attempt with 1000 it accepted it, but is 1000 a valid gid and uid on your system?

what is the output of ls -lan "${LOCALAPPDATA}/Plex Media Server you’ll need to replace the variable with actual data. Also state if this is a local disk or a remote disk. if it’s local, what is the file system?

bear in mind, synology sometimes uses ACLs which cause a lot of issues.

<UID of synology user> and <GID of synology user> in my post is just a place holder. In actuality they are the synology IDs for the user that owns the media files on the synology disk drive.

The media files are stored on the NAS synology drive, while the config files are on my local (NOT a remote) windows NTFS file system.

So running the windows dir command

Screenshot 2024-02-21 183743

The LOCALAPPDATA is the windows provided environment variable a user’s AppData\Local folder within the user’s directory of windows. So full directory would be C:\Users\<my username>\AppData\Local\Plex Media Server

Also, no 1000 does not exist on the synology system for any user. Yet it still ran just fine when watching media files. I just had that from copy/paste when I first set it up a few months ago and it worked so I didn’t mess with it at the time. I only just now tried to delete a file for the first time and found this issue with my setup.

At this point, your setup is outside of our support. Someone else may decide to chime in, though it be better to come in discord

Thank you. I’ll join the discord.