Plex Media Server - All Media Unavailable - Linux/CentOS -> mount of synology volume path

Hey All - i recently ran into an issue after doing a package update on my synology drive - the problem is that all files are now ‘Unavailable’ in my plex clients (tried, roku, web, and a friend remote). The exact error i get is the following:
May 01, 2018 20:56:11.392 [0x7f9d62a3b700] ERROR - Couldn’t check for the existence of file “/mnt/mediaserver/TV Shows/Falling Skies/Season 1/Falling Skies - S01E10 - REPACK 720p BluRay X264-CLUE.mkv”: boost::filesystem::status: Permission denied: “/mnt/mediaserver/TV Shows/Falling Skies/Season 1/Falling Skies - S01E10 - REPACK 720p BluRay X264-CLUE.mkv”

This happens for every single file. My mount settings haven’t changed at all in /etc/fstab - but here is the current settings (again, this worked perfectly right up to the package update on my synology):
/etc/fstab:
192.168.1.9:/volume1/Media /mnt/mediaserver nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

192.168.1.9:/volume1/Media
28T 25T 2.4T 92% /mnt/mediaserver

My mounted drive looks like this permission wise for /volume1/Media
d--------- 29 root users 4.0K Mar 12 17:45 mediaserver
drwxrwxrwx 208 1024 users 16K Apr 2 20:29 TV Shows (/mnt/mediaserver/TV Shows)
drwxrwxrwx 1105 1000 1000 52K Apr 29 04:51 Movies (/mnt/mediaserver/Movies)
(no idea why there is a difference here…)

I am mounting as NFS and i can access / play these videos on other windows machines with no issues. This is without having to enter any credentials and the drive is not windows mounted:
\192.168.1.9\Media\Movies\22 Jump Street (2014)

  • this video plays on this laptop - remotely to the NAS without issues. However, trying to play the same video through plex would generate a similar permission issue as seen above.

Obviously i have a permissions issue - but i am not a linux guru nor do i understand what change to cause this to break. I REALLY hope someone here can give me some pointers as to where i am going wrong!

Thanks a million in advance!

If I may augment?

NFSv3 is slow.

Enable NFSv4 if you have it in Centos (you should)

I would also flip a few options in your mount

192.168.1.9:/volume1/Media /mnt/mediaserver nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

Becomes

192.168.1.9:/volume1/Media /mnt/mediaserver nfs defaults,sec=sys,auto,vers=4,noatime,bg,nofail 0 0

What I have changed:
1, sec=sys means root can transit the NFS mount and you can hand set permissions on the synology to 755/644 as needed (if you do at all)
2. Go to version 4 NFS which gives you: A. TCP B. a R/W buffer size of 1048576 (1 meg) instead of the default of 32KB. (Huge performance gain)

Thank you both for the responses. I am now able to access my media through Plex without issue. I now see other permission issues in other platforms trying to access to the same directories - but in terms of Plex… all good to go it seems. Can’t thank you enough for the fast and nice responses.

I am still having this issue - i am not sure what has happened - in my effort to try to update other permissions i think i broke the plex ones again.

I do not understand why plex all of a sudden cannot reach my Synology server again - i am using the NFSv4 as suggested without issue - that was working just fine before when it was working okay over the last 24 hours. Since then i have obviously made other permission changes that broke plex access.

The NFS mount seems to work in that i can access the files on the plex server (remote from synology box) and i can move the files, rename, etc.

[root@plex Zootopia (2016)]# mv Zootopia\ (2016)-test.mkv Zootopia\ (2016)-test2.mkv
[root@plex Zootopia (2016)]# ls
Zootopia (2016)-test2.mkv

So if i can move / rename a file on the plex server and the change works on the synology - why cannot plex simply read the file?

I am completely at a loss. Please please help. I would be willing to pay someone to help me solve this problem (i am just too scared to make more changes).

Thanks in advance (again!)

@ccfc1986

Would you mind recreating the 404 error again for me, collecting the logs, and then attaching the ZIP ?

@ChuckPA - i am not seeing 404 errors when accessing my content via plex.

@trumpy81 - i agree on both points A and B - trying to revert changes on my synology that may have broken the access for Plex. For whatever reason, using the default ACL permissions on my synology doesn’t work - i had to force permissions at the nix level for the Plex system to be able to read data on the mounted share. I would have preferred to keep using the ACL’s for Synology - hence some of the changes i made based on synology forum recommendations. However, none of that worked - so trying to revert to get Plex up and working again.

I believe running these commands got it to work previously… so far still no luck getting access to the files for Plex.
find /volume1/Media -type d -exec chmod 775 {} ;
find /volume1/Media -type f -exec chmod 664 {} ;
find /volume1/Media/TV\ Shows -type d -exec chmod 775 {} ;
find /volume1/Media/TV\ Shows -type f -exec chmod 664 {} ;

From my plex server:
[root@plex ~]# ls -alh /mnt/mediaserver/TV\ Shows/The\ Expanse/Season\ 3/The.Expanse.S03E05.720p.mkv
-rw-rw-r-- 1 root root 693M May 9 03:07 /mnt/mediaserver/TV Shows/The Expanse/Season 3/The.Expanse.S03E05.720p.mkv

From my Synology Server:
drwxrwxr-x 30 root root 4.0K May 10 16:55 Media

drwxrwxr-x 208 root root 16K Apr 2 20:29 TV Shows
drwxrwxr-x 1112 root root 52K May 11 03:01 Movies

I have attached the most recent log when trying to access my media for review.

Thank you all for your patience and support.

May I also see the NFS mount options? Those are very important.

If you want to continue using username (ACL) permission control,
a. Create a username on your Synology which will access your media (typically plex)
b. Give it permission to read the appropriate shares
b. Revert (remove) the sec=sys option from the mount options for the share. Doing so reengages username-based authentication

Chuck - thank you for the fast response. Great points… i would much rather use the synology ACL’s - so i will go through and re-engage them on those folders. I already have a plex user locally generated in the synology system - and it already has read/write permissions to the /volume1/Media/TV Shows and /volume1/Media/Movies folders. The only piece i didn’t change in that configuration was part C in your note. I will go back and setup the ACLs, confirm the plex user on synology has access to the folders (again) and i remove the sec=sys part from my /etc/fstab then will remount.

Here is the current mount configuration on my centos plex server:
192.168.1.9:/volume1/Media /mnt/mediaserver nfs defaults,sec=sys,auto,vers=4,noatime,bg,nofail 0 0

Give me a little time (it’ll take a while to use the synoacltool to re-implement the ACL permissions). I will post back with my findings.

If there is something else wrong (i will remove sec=sys part from the above once A/B are complete) in the mount command please let me know.

Again, THANK YOU

I have done everything you had mentioned in your previous post (at least i think so).

Here is the current permissions when logged onto the Synology NAS for the /volume1/Media/TV Shows folder:
d---------+ 208 496 492 16K Apr 2 20:29 TV Shows
[0] group:administrators:allow:rwxpdDaARWc–:fd-- (level: 0)
[1] group:sc-media:allow:rwxpdDaARWc–:fd-- (level: 0)
[2] group:sc-download:allow:rwxpdDaARWc–:fd-- (level: 0)

My synology plex user belongs to sc-media and sc-download groups in the synology. I also remove the sec=sys part from the mount in /etc/fstab and did a mount -a to remount the drive (should be enough right?).

On the plex server, looking at those directories i have the following:
drwxrwxrwx 1112 plex plex 52K May 11 03:01 Movies
drwxrwxrwx 208 plex plex 16K Apr 2 20:29 TV Shows

Content is currently ‘Unavaiable’ in this config. :frowning:

Why don’t you apply permissions through the Synology GUI? Simplify and get out of the filesystem if you’re going to use ACLs.

DSM does not use actual file ACLs so whatever you manually apply are meaningless. If you noticed, by default, files and directories have permission of 000 (no permission). The Synology ACL database control everything and is done on a per NFS/SMB/AFP basis

Control Panel - Shared Folders -> Edit the share -> NFS Permissions. Make certain you have either the IP of the host or create a wildcard *

Because i had overriden the ACL’s i had to use the command line tool to copy a new folder i created with what i believe to be ‘correct’ permissions. Once those are in place (as you saw in the previous comment) i can use (as you also said) the UI to update permissions correctly etc.

Previously i had gone in as root can forced nix permissions to solve the issues synology created with updated permission in 6.0.

The NFS share is already created, with a wildcard for the remote hosts.

(Not working)
drwxrwx—+ 208 plex sc-media 16K Apr 2 20:29 TV Shows
[0] group:administrators:allow:rwxpdDaARWc–:fd-- (level: 0)
[1] group:sc-media:allow:rwxpdDaARWc–:fd-- (level: 0)
[2] group:sc-download:allow:rwxpdDaARWc–:fd-- (level: 0)

(Working)
drwxrwx—+ 1112 plex sc-media 52K May 11 03:01 Movies
[0] group:administrators:allow:rwxpdDaARWc–:fd-- (level: 0)
[1] group:sc-media:allow:rwxpdDaARWc–:fd-- (level: 0)
[2] group:sc-download:allow:rwxpdDaARWc–:fd-- (level: 0)

Parent Folder (/volume/Media)
d---------+ 30 root root 4.0K May 10 16:55 Media
[0] group:administrators:allow:rwxpdDaARWc–:fd-- (level: 0)
[1] group:sc-media:allow:rwxpdDaARWc–:fd-- (level: 0)
[2] group:sc-download:allow:rwxpdDaARWc–:fd-- (level: 0)

Am I correct in summarizing:

  1. You set ACLs
  2. Nothing worked through the GUI so you used the command line to copy to a new folder with new ACLs
  3. You had to force linux permission to get any access

Am I summarizing correctly

Yes, you are correct. Ever since 6.0 i had to use CLI permissions on the synology to allow plex to watch content.

Thank you.

Now for what you will most likely not want to hear but what we need to work through and get past.

  1. How you think ACLs should be applied here, don’t apply
  2. The work you’ve done in hammering things into the state they’re in, wasted effort

Let’s start fresh and walk through one share.

All from the Synology GUI:

  1. Create a new share for something you will be exporting: e.g “Movies-NEW”
  2. In the permissions tab, as you create the share, give your username permission to R/W that share and user plex (which matches the server machine, permission to Read-only), Also be certain to create the NFS export wildcard permission, with no-root-squash, and R/W permission.
  3. Using File Station, copy the files from the old share to the new.

Now go to the Centos host

  1. Go to your Linux system: mount ip.addr.of.syno:/volume1/Movies-NEW /new/local/mount/point
  2. Verify read/write for you.
    3… Create a new library section and point plex at the local mount point.

After performing these steps - twice - i still cannot get permissions to read from the new mounted directory pointing to the ‘NewMedia’ share on my synology.

d---------+ 4 root root 4.0K May 12 10:40 NewMedia
[0] group:administrators:allow:rwxpdDaARWc–:fd-- (level: 0)
[1] group:sc-download:allow:rwxpdDaARWc–:fd-- (level: 0)
[2] user:plex:allow:r-x—a-R-c–:fd-- (level: 0)
[3] user:admin:allow:rwxpdDaARWc–:fd-- (level: 0)
[4] group:sc-media:allow:rwxpdDaARWc–:fd-- (level: 0)

When i go to add the directory/library in plex, it doesn’t even register that there is a subfolder in the directory (TV). The initial scan that runs throws a similar permissions issue also.

  1. For all the media now IN the NewMedia share, erase ALL the ACLs.
  2. Set permissions in the Synology database for the files using FileStation. See the screenshot below

You must understand that any filesystem permissions beyond Linux rwx style are controlled by the Synology database. Synology doesn’t store them at the file like you’re used to. NTFS style and Synology style are completely different and why I explained your efforts had been wasted effort.
Any attempt to apply then using regular file permissions settings without using synoacltool will result in the failure you’re seeing.

the fundamental rule on Synology is to keep it simple. Use the GUI.

I do the following setting when I install PMS and create the Plex share. This ACL allows basic read access for any username which has been granted permission to read the share in Shared Folders -> Permissions

synoacltool -add $PLEX_LIBRARY_PATH user:plex:allow:rwxpdDaARWcCo:fd--

You’ll notice it’s a lot simpler than what you applied.

Again,

  1. Remove ALL ACLs from the files on the files you copied.
  2. Do not apply ACLs or anything at the command line level
  3. Apply the permissions as I show below (adjusting for the additional usernames you wish to add… notice plex has been given permission) to all directories and files in NewMedia

What I’m trying to get you to do is STOP using ACLs and leave it OPEN for now using the SYNOLOGY DEFAULTS. Synology is the easiest system to connect to if you do it their way. Attempt to overcontrol / muscle it results in problems.

As additional…

In the GUI only.

  1. create a new share with it exported (NFS permissions tab)
  2. create some directories in it
  3. go to Centos and mount it.

If you do not have access at that point, the problem is your Centos system and how you’re using it, NOT the synology

Thank you ChuckPA for all your responses. I have had issues with the system for a while now but Plex has been working without issue. I have followed the steps above and run into the issue where after mounting the new share I cannot see any sub-folders. I mounted the new drive with the basic command listed above (something like this: mount ip.addr.of.syno:/volume1/Movies-NEW /new/local/mount/point).

I can see the parent folder in the directory - for example i have this /volume1/TV-New and in that folder i have a single copied folder with associated files called ‘Alone’. So the path looks like /volume1/TV-New/Alone. Plex can see the ‘Alone’ folder - but NOT the folders/files under it (Season1, Season2, etc).

Based on that - it sounds like you are saying its a CentOS issue rather than a synology issue?

I ran this command to reset the permissions on the Alone folder after i copied it across - this set up the parent ACL stuff to the Alone folder and its sub-folders (at least i think it did - seemed to have!)

I have attached some screenshots/links for the current config of the new share and its folders.

d---------+ 4 root root 4.0K Jul 17 11:25 TV-New
-> drwx------+ 6 admin users 4.0K Jun 15 22:58 Alone
-> -> drwx------+ 3 admin users 4.0K Apr 7 2016 Season 1
drwx------+ 2 admin users 4.0K Jul 15 2016 Season 2
drwx------+ 2 admin users 4.0K Aug 20 2017 Season 4
drwx------+ 2 admin users 4.0K Jul 13 03:00 Season 5




Did you have a chance to read through my How-To for this?

If so and it doesn’t quite get it, I’ll help you customize it but it should work for you. Just take your time going through it

The 4th one is what you want to read.

1 Like