How to update Plex Media Server when using a non-default metadata directory location?

Server Version#: 1.42.2.10156
Player Version#: n/a

I somewhat recently changed my Plex Media Server’s metadata directory to be in a different location (to avoid taking up so much space on my OS’s drive). I accomplished this by moving the Application Support directory to a new drive, and modifying the plexmediaserver service file as such:

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/zeta/plexmediaserver/Library/Application\ Support"
UMask=0002

The server has been running great for months since making this change.

However, I am no longer able to update via the standard method (installing via new .deb package). When I try, I get the following error:

Preparing to unpack plexmediaserver_1.43.0.10492-121068a07_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Error: Directory "/mnt/zeta/plexmediaserver/Library/Application\ Support" used in "/etc/systemd/system/plexmediaserver.service.d/override.conf" does not exist.
PlexMediaServer install: 
PlexMediaServer install: Pre-installation Validation failed.
PlexMediaServer install: Configuration information discovered:
PlexMediaServer install:   Installation Type:   Update
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         _ssh
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install:   Temp Directory:      /tmp
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Processor:           13th Gen Intel(R) Core(TM) i5-13600K
PlexMediaServer install:   Config file used:   /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install:   Intel i915 Hardware: Found
PlexMediaServer install:   Nvidia GPU card:     Not Found
PlexMediaServer install:  
PlexMediaServer install: Pre-installation Validation complete.  Errors: 1, Warnings: 0

Notably:

Error: Directory "/mnt/zeta/plexmediaserver/Library/Application\ Support" used in "/etc/systemd/system/plexmediaserver.service.d/override.conf" does not exist.

This directory does, in fact, exist and is owned by plex:plex:

root@plex:~# ls -ld /mnt/zeta/plexmediaserver/Library/Application\ Support
drwxr-xr-x 3 plex plex 4096 Sep 10 09:05 '/mnt/zeta/plexmediaserver/Library/Application Support'

Check each directory in the path,make certain it’s really a directory , not a symlink and resolvable.

  1. /mnt/zeta
  2. /mnt/zeta/plexmediaserver
  3. /mnt/zeta/plexmediaserver/Library

The installer does a simple directory test to see if it can read the directory.

  # Validate Application Support Dir (antimatter storage)
  if [ "$OverrideAppSupp" != "" ]; then
    if [ ! -d "$OverrideAppSupp" ]; then
      Output "Error: Directory \"$OverrideAppSupp\" used in \"$OverrideFile\" does not exist."
      Errors=$((Errors + 1))
      Fail=1
    else
      AppSuppDir="$OverrideAppSupp"
    fi
  fi

I’m not getting the same results as the updater.

When checking with stat, I get the following:

root@plex:~# stat /mnt
  File: /mnt
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 252,20  Inode: 3014657     Links: 4
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)

root@plex:~# stat /mnt/zeta/
  File: /mnt/zeta/
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,161   Inode: 2           Links: 4
Access: (0755/drwxr-xr-x)  Uid: ( 1000/ user)   Gid: (10000/nas_shares)

root@plex:~# stat /mnt/zeta/plexmediaserver/
  File: /mnt/zeta/plexmediaserver/
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,161   Inode: 25427969    Links: 3
Access: (0755/drwxr-xr-x)  Uid: (  999/    plex)   Gid: (  990/    plex)

root@plex:~# stat /mnt/zeta/plexmediaserver/Library/
  File: /mnt/zeta/plexmediaserver/Library/
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,161   Inode: 25427970    Links: 3
Access: (0755/drwxr-xr-x)  Uid: (  999/    plex)   Gid: (  990/    plex)

root@plex:~# stat /mnt/zeta/plexmediaserver/Library/Application\ Support/
  File: /mnt/zeta/plexmediaserver/Library/Application Support/
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,161   Inode: 25427971    Links: 3
Access: (0755/drwxr-xr-x)  Uid: (  999/    plex)   Gid: (  990/    plex)

It seems like each directory is indeed listed as a directory (no sym links).

Forgot to reply directly. Any other ideas?

In case anyone finds this via search – the issue was that I had a literal backslash in the path within my override.conf file:

Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/zeta/plexmediaserver/Library/Application\ Support”

That was getting included in the path used by the installer, since it’s surrounded by double quotes.