Cannot get linux permissions to work with Ubuntu and an NFS mount

Server Version#: 1.14.1.5488
Player Version#: 3.89.2

Struggling as I have had this working but now I’ve done “something” and this doesn’t seem to work any more.

In summary, Plex cannot see any files in my NFS mount points. It can see the folders but not the files inside them. This looks like a permissions issue but I cannot see what I have done wrong.

Setup:
Synology DS918+ (192.168.10.10)
Ubuntu 18.04 LTS running on Hyper V which runs Plex server
NFS share between the two.

I’ve followed this guide:

:heavy_check_mark: plex user created on NAS.
:heavy_check_mark: Mount point directory structure created
:heavy_check_mark: fstab entries added

My mount point directory structure is as follows:

/ds918/public/

fstab entries:

192.168.10.10:/volume2/public   /ds918/public   nfs     auto,defaults,sec=sys,ro,async,bg       0       0

(Note the fstab settings differ from the guide I linked, I have tried with the settings from the guide but that didn’t work so I have attempted adjustment based on other forum posts)

If I perform an ls -l in /ds918 I can see the following:

drwxrwxrwx 7 root root 4096 Feb 22 19:44 public

Drilling in further:

drwxrwxrwx   2 1024 users  4096 Feb 22 20:10  Drop
drwxrwxrwx 212 1024 users 12288 Feb 24 20:57  Movies
drwxrwxrwx   2 root root   4096 Feb 22 15:32 '#recycle'
drwxrwxrwx  56 1024 users  4096 Oct 10 20:47  TV

I can see a problem here already in that I have 777 permissions on my files but I did a recursive chmod -R 755 /ds918 on the file system in accordance with the guide. When I review the output from that I can see the following:

chmod: changing permissions of '/ds918/public/aaaaaaa (nnnn)': Read-only file system

This is where I have some confusion. I want the share to be read only so that a process on the Ubuntu VM cannot the files on my NAS. Likewise, my fstab file specifies that this mount point should be ro.

Interestingly, all of the files right down the mount point directory structure report as 777 until I hit play in Plex. At this point Plex says it cannot access the file and if I then do another ls -l the the permissions are shown as follows:

d--------- 212 1024 users 12288 Feb 24 20:57 Movies

Additionally, the fact I can click play shows that this did work. It must have for Plex to be able to collect all of the information on the files at some point. The only thing changed since that has been I rebooted the VM.

Obviously I’m doing something wrong here. Would be grateful for any thoughts.

This listing

d--------- 212 1024 users 12288 Feb 24 20:57 Movies

shows there are no permissions assigned. Only root can access it.

sudo chmod 755 Movies will change that to drwxr-xr-x. If it does not, you have a bigger issue in how it is defined in the VM.

Is there any reason you cannot run the native server package and avoid this complexity?

I have tried that but it didn’t seem to work.

What did work in the end: Changing the Synology settings to allow Read/Write for the NFS share.

This did allow me to write a file from the Ubuntu machine back to the DS918 which is exactly what I wanted to avoid. However, once I had made that change and then remounted the directories it all started to work. I have stopped the Ubuntu machine from being able to write on the NFS share by changing the fstab file to have the ro setting on the mount entry.

I’m hoping this is secure as you need to sudo to change the fstab file. I must confess that Linux security is not an area of expertise for me.

I could use the native server package I suppose, however the Ubuntu VM runs on an i7 which is a lot more powerful than the DS918. We watch stuff with a lot of subtitles and it seems to work better in this configuration. That said the DS918 does have a special processor as I understand it for doing this type of work.

I’m sorry, I missed the Synology part even though you did state it.

On Synology, because they are strict, you have two choices.

  1. create a user plex for NFS purposes and then give user Plex permission to the shares
  2. create a user plex for NFS purposes but mount with sec=sys option AND edit the UID on Synology and your system to match. This may mean editing both to find a non-conflicting value above 1024. I use 1027:100 without any conflicts. Now sudo and my local user plex have proper access. DSM is out of the picture because security is handled at the Linux level.

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