Permissions on Preferences.xml keep resetting

Server Version#: Linux 1.32.8.7639
Player Version#: Plex for Linux 1.76.2.3951-15712eae

Hello,
I am trying to create automatic nightly backups of the Plex data directory.
When copying the files there are a set of files that fail to copy due to permission errors.
An example file is “Library/Application Support/Plex Media Server/Preferences.xml”.
By default the Linux permissions on this file are 600.
Since I am copying via ssh, I don’t want to access my server via root but rather a specific backup user account. In order to provide read access to these files to the backup user, I changed the permissions of the files via “chmod g+r Preferences.xml”.
This works fine if I copy the file immediately after, but whenever the plex server is restarted, the permissions of the files reset to “600” and the next time the automated backup tries to copy the files, it fails.
Plex is running in a docker container on an Arch Linux host. The Plex data directory is mounted into the container from the host.
Any advice on how to solve this?

Post your docker compose file.

I am using docker run, rather than compose. Here is the run command:
docker run --name plex -d
-v /media/data/plexdata:/config
-v /media/data/movies:/media/data/movies:ro
-v /media/data/audio:/media/data/audio
-v /etc/localtime:/etc/localtime:ro
-p 32400:32400
–net=host
-e TZ=Europe/Berlin -e PGID=1000 -e PUID=969 -e VERSION=docker
–restart unless-stopped
–device=/dev/dri:/dev/dri
–privileged
linuxserver/plex

If you exec into the running container and run umask, what value is returned?

What user is 969?

Umask is 0022
And the uid 969 is the plex user account on the host os.

Preferences.xml seems to be normal with 0600 permissions.

Suggest running Plex as the same user as the user making the backups, or vice versa.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.