Prevent Plex permission drift by keeping its numeric runtime identity stable, preserving ownership during restores, and testing appdata and media access separately.
Permission failures often appear after an image update, host migration, stack recreation, or backup restore because the files survive while their numeric owner, group, ACL, or expected runtime user changes. The safest prevention is a known-good baseline for `/config` and media, plus one small verification after every change. Avoid broad recursive permission fixes unless the baseline proves the entire tree truly needs the same ownership.
Record Numeric Ownership Before Changing Permissions
Permission drift is easiest to prevent when you know which numeric UID and GID the Plex process uses and which numeric owner is stored on appdata and media paths. Usernames can differ between host and container while the filesystem still enforces numbers.
Numeric UID and GID mapping lets the container process align with host ownership. Record those values in the stack configuration instead of relying on usernames or memory.
Capture `stat` output or equivalent for one appdata directory, one database file, and one media directory while the system is healthy. Those become your baseline after image updates, host migrations, restores, or storage moves.
Keep the Runtime Identity Stable Across Container Updates
An image update can change defaults, entrypoint behavior, or the way an environment variable is interpreted. If the effective Plex process starts under a different identity, newly created files may have different owners and later restarts can lose access to older state.
After a platform or image change, lost appdata write access can signal that the effective runtime identity no longer matches the files it must update.
After every image or host upgrade, check the process UID/GID inside the running container and create one test file in a disposable writable path if appropriate. If the numbers changed unexpectedly, fix the runtime configuration before new ownership spreads.
Separate Appdata Write Access From Media Access
Plex application state normally needs read and write access, while media libraries may only need read access unless the workflow deliberately lets other tools manage files. Giving one broad permission set to both paths hides which responsibility is actually required and increases the blast radius of a mistake.
Stable container access depends on PUID and PGID alignment rather than unrestricted mode bits. Match access to the service role instead of using world-writable permissions as a persistent fix.
Define expected access separately for `/config`, media, and transcode scratch. Test the Plex process against each path after changes. A read-only media path failing to delete files may be intentional; an appdata path failing to create database journals is not.
Make Restores Preserve Ownership and ACLs
A backup can contain every Plex file and still produce permission drift if the restore tool writes them under the administrator account, strips ACLs, or changes group ownership. The next container then sees apparently complete data but cannot update it consistently.
Before startup, restored ownership must be compared with the runtime identity so a complete backup does not reopen as an unreadable appdata tree.
Include owner, group, mode, and ACL behavior in the restore test, not only checksums and file counts. Restore a small sample to an alternate location and compare metadata. If the tool cannot preserve permissions, add an explicit post-restore ownership step to the runbook.
After the sample restore passes, repeat the check with the same tool and options that will be used in a real recovery. A permission-preserving test that depends on a different manual copy method is not evidence that the production backup workflow is safe.
Audit Drift With Small Tests Instead of Recursive Repairs
Recursive `chmod` or `chown` commands can make Plex start again while also rewriting permissions that were intentionally different across media, backups, or shared application data. A safer maintenance loop detects the exact path that drifted and corrects only the ownership or access required.
When appdata permission checks fail, test the named path with the Plex runtime identity before changing a mount, owner, ACL, or user.
If permission changes coincide with container replacement, the container persistence workflow must keep runtime identity and data location controlled together.
Support & Tips
More to Read

Can Plex Share a GPU With Another Docker Container?
Plex and another container can often access the same GPU, but you must test driver support, device mapping, video-engine load, memory, and recovery behavior.

How to Tell Whether a Plex Error Comes From the Client or Server
Reproduce the same item on another client, compare the session path, then collect server evidence only after scope tells you where the failure actually...

How to Configure Plex Cache and Transcode Temporary Storage
Protect persistent Plex state while placing transcode temp files on suitable local storage, then verify cleanup, free space, and restart behavior.

