Ubuntu mounting QNAP share - Plex shows 'Permission denied' only on some files

Server Version#: 1.22.2.4282
Player Version#: 4.54.5

I’m in the process of migrating my Plex Media Server from my QNAP to a Ubuntu VM. I have iGPU passthrough working and it’s showing hw transcoding. Result!

The new PMS instance has managed to scan the majority of my library in the new location however there are a few Movies which is returning Permission denied (13) on some files:

Apr 16, 2021 12:42:57.875 [0x7fe15ffff700] ERROR - Error opening file '"/mnt/videos/Movies/Jumanji The Next Level (2019)/Jumanji The Next Level (2019) Remux-2160p.mkv"' - Permission denied (13)

The files all reside on my QNAP and I’ve mounted them on my Ubuntu VM using /etc/fstab - contents below:

//192.168.1.1/Videos    /mnt/videos     cifs    defaults,rw,credentials=/home/chris/.nascreds

/home/chris/.nascreds was originally set us as user quickbox which has r/w permissions against /Videos on my QNAP NAS. I then though I would try a new user on the NAS called plex as that’s what runs PMS on the Ubuntu install.

What’s perplexing is that there appears no difference between a file PMS can scan and one which it can’t:

(1:146)# ls -l /mnt/videos/Movies/Jumanji\ The\ Next\ Level\ \(2019\)/
total 48G
-rwxr-xr-x 1 root root 48G Apr 11  2020 'Jumanji The Next Level (2019) Remux-2160p.mkv'

Working file:

(1:147)# ls -l /mnt/videos/Movies/Aquaman\ \(2018\)/
total 69G
-rwxr-xr-x 1 root root 69G Mar 19  2019 'Aquaman (2018) Remux-2160p.mkv

From reading I think PMS on QNAP runs as root and it runs as plex on Ubuntu, which I think may be causing the issues. I’m a little hesitant to reform a mass chmod or anything else on the QNAP as currently I can just fall back to the QNAP to carry on doing PMS duties.

Can anyone offer any advise please?

My advice, when using Linux & QNAP , is to use NFS instead of CIFS. NFS is native Linux and, as such, works far better.

By using NFS, the QNAP becomes a storage extension of your Linux host. The transition from local storage to NAS storage becomes transparent.

  • Install NFS on the Ubuntu with: sudo apt install nfs-common

  • Stop PMS while you make the changes

  • Unmount the existing CIFS mount

  • Add NFS export permissions to your QNAP shared folder
    (Control Panel - Shared Folders - Edit shared folder permissions - NFS selector - Grant Access, ADD * export rights with no root squash – see below)

  • Change the mount to:

192.168.1.1:/Videos     /mnt/videos     nfs  defaults,sec=sys,rw,auto,nofail,bg 0 0
  • You’ll now see how the QNAP becomes a more friendly extension to your Linux host.

  • You can use sudo as you wish on the shared folder just as if local.

It might also be a good idea to play with this at the command line a bit before changing fstab as well.

sudo bash
mkdir /mnt2

mount -o defaults,rw,sec=sys 192.168.1.1:/Videos /mnt2

I have this How-To if it’s of help

https://forums.plex.tv/t/how-to-mount-media-from-your-nas-shares-on-linux-using-nfs/197947

That’s worked perfectly, thank you.

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