How does Plex know how to access the plex user in Synology?

I have been using Plex on Synology DSM 6 for years and everything is working great. I love PLEX.

I am hoping someone can help me understand how the Synology permissions work. I understand that there is a plex user and that they have permissions set for the right folders. What I do not fully understand is how PLEX the app knows about plex user? Does it search for a user named “plex” and upon finding one, it assumes the same permissions? Or was there a step in the setup process where I linked them? (it has been a very long time)

I hope my question makes sense. I am trying to learn more about how the external applications actually get access to the Synology user that I am giving access to the files.

Thnk you in advance!

On Synology,

Whether it be DSM 6 or DSM 7, Plex Media Server is an unprivileged application.

By being unprivileged , it can’t look at any folders or files which you haven’t expressly granted permission to read (or write) as the case may be.

Synology does this by using their version of ACLs (Access Control Lists)

You grant permission to a username or group in Control Panel - Shared Folders - Folder Name - Permission tab.

When you check the boxes, it builds the ACL to apply to the folder or file(s).

When you point Plex at the particular folder, it will be able to read based on the permission granted by the ACL.

But how does that work? What does Plex look for and find in the particular folder I point it to? Must the user be named plex? How can I see what an application like Plex is looking for

All the access (permission) control is handled by the underlying Linux operating system.

PMS simply goes and looks for the files (movies or episodes) just as you told it to.
Files named like Movies in a Movies-type library section
Files named like Episodes in a TV-type library section.

If the operating system (ACLs) grant access, the operation succeeds and the media is added / played.

If not, it will show in the logs as “Permission Denied”

I’m curious about how, after 6 years, this isn’t familiar ?

On Synology, we’ve needed to expressly grant permission to see the media since 1.15.4.994 (I did that Synology NAS software work)

I apologize but you haven’t answered my question because I do not think I am explaining it well.

How does Synology know that plex user getting permissions means that the Plex application should be able to look for the content and not be denied access? Does that make sense?

There are two processes that are separate and I do not understand how they are linked.

  1. Plex is told to look in certain folders.

  2. Synology has a plex user who has access to certain folders.

How are those two things linked?

Ah,

On every computer, we sign in with a given username the computer knows us as.

That user account has contains the identification and privilege information.

When you store your files on the Synology, it knows they are “your” files because you’re the username creating them.

It assigns your identification as the owner so , by design, you always have full access to ‘your stuff’.

When it comes to other users (usernames) – that’s where permission is granted by you for those other user(s) to have specific access or not.

As far as Plex is concerned –

When it is installed, a user account is created for it by DSM just like DSM created one for you when you set it up.

When PMS starts, it always starts and assumes that identity (user: Plex).

Now we have two users: You and Plex.

Default Linux security prevents one user (Plex) from seeing your files unless you grant permission for that user to do so.

This is why we must tell DSM (Linux) that user ‘Plex’ is permitted to read our media files.

From there, We’ve already told Plex where the media is stored so it takes that information and starts scanning those folders looking for whatever it has access to.

That make more sense?

I just installed plex. It cannot see the files. I do not see a flex user. Does it use the username I use for plex? I do have the same user on my synology with access to the folder.

DSM 6 – has Local User - plex.
DSM 7 – has System Internal User - PlexMediaServer

To make Plex see your files, because Linux is very strict about permissions,

Control Panel - Shared Folders -

  • EDIT the share containing media (repeat as needed)
  • Permission tab
  • Change “Local User” → “System Internal User” (upper left dropdown)
  • Grant permission to “PlexMediaServer”
  • Click DONE
  • CLick “Apply to this folder, sub-folders, and files”
  • Click SAVE

Advance to the next shared folder to edit.

2 Likes

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