Erik Peña

Plex file permissions on Synology

None of my files are being picked up by Plex on my Synology NAS!!!

A very frustrated user

Indeed the above is something I’ve been saying for the last couple of months as I wondered why none of my files were being picked up by Plex.

I had done quite a bit of research on this only to find a lot of proposed solutions but no one right answer. It’s possible that the reason I couldn’t find a viable answer was due to the uncommon setup of using the Plex media server that was installed on my Synology 1817+ appliance.

While I had ensured that all the basic permissions for the shared folders were done (e.g. user permissions and group permissions), the permissions for the files still were out of sync of what Plex media server is expecting. This is caused because Transmission sets the permissions based on a different set of configurations.

The solution was a combination of three different approaches that I had to meld together–

  • The first obvious one was to set the user/group permissions (take a look at the Where should I put my media files document).
  • I had to understand the the “Synology FAQ’s… Read This First!” provided by Plex (Q18) you’ll see that specific file and directory permissions are needed in order for the Plex media server to pick up files. The document lists that files should have an octal notation permission of 644 and directories should have an octal notation permission of 755.
  • Understand how the file and directory permissions were set by Transmission. I found this answer on Stack Exchange.

Working in small steps, I first had to navigate to the Transmission application directory. This is a little different when not in the context of Synology because Transmission is installed as a package and is therefore placed in a different directory. Below is how you change to this directory–

$ cd /usr/local/transmission

The settings within Transmission accept a umask for determining the default file permissions for files that are downloaded. We’ll need to convert the octal notation to the base 10 version (which will be the umask value) of the octal notation value. This can be done easily in terminal using the following command (where 644 is the octal notation value I’m converting)–

$ echo $((8#644))

Executing the command returns with “420” (#blaze_it). We’ll now need to modify Transmission’s configuration to use the new umask. From the Transmission directory we changed to earlier, we can modify using vim (or you can use whatever text editor of your choice.

$ vi ./var/settings.json

This file, as the extension suggests, is a Json file. Find the “umask” property and change it to the value you want. I’ll be replacing the value with 420 (#yeet). Save changes.

Lastly, we can change permissions for the directories that are created during the downloaded files. This is done by changing the parent directory’s permissions which will be inherited by any directory created during download. You can even change group ownership too, but I didn’t need that so I’ll be skipping that as well (the process is the same).

To change the parent directory permission, change directory to the NAS volume (I only have one volume so obviously I changed to “volume1”)–

$ cd /volume1

Next, chmod the directory for which torrents are downloaded to. Mine was (creatively) named “torrents”. So using chmod and the octal notation value that was from the “Synology FAQ’s… Read This First!” document, I execute the following command–

# chmod 775 torrents

That’s it! Assuming you did the base user/group permissions correctly, any new files that are downloaded should be okay to move into other directories that are tied to Plex media server and Plex media server should be able to pick up the new files.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.