New DVR recordings folder is created without permission

Server Version#: 1.19.1.2701
Player Version#:

Having a strange problem and was curious if anybody else experienced this. PMS is running on a dedicated NUC with Ubuntu. I have all my media using NFS shares via Synology NAS. I also have HDHomeRun CONNECT DUO so we can watch/record our local channels. I have noticed if I schedule a new DVR recording when Plex is making the directory in the dvr library the folder has only owner read permissions and thus plex can’t save the recorded file to the folder until I go in and change the permissions. Is there a setting in plex to fix this? Is this a known issue? Am I doing something wrong in maybe my NFS mappings or in the share options on Synology? Once I change the permission on the folder all episodes record fine.

I’m no expert, but while you’re waiting for an expert to help, it sounds like a
permissions problem.

If your mount point is

/mnt/MEDIA1

check the permissions of /mnt and /mnt/MEDIA1

ls -ld /mnt/ /mnt/MEDIA1

I’m pretty sure /mnt/MEDIA1 must be 755 (or more). /mnt may also need to be 755.

Also check how you have NFS set up. make sure /mnt/MEDIA1 has “rw”
permission in /etc/exports.

Good Luck.

I have checked the permissions and that whole mount is owned by plex.plex. It also does create the folder correctly but when you look at the permissons it only has read for the owner so even though plex owns the directory it can’t copy/move the recorded file over when it finishes. Once I go in and give owner full permissions (rwx) it starts recording the episodes fine. This is what is leading me to believe that plex is not creating that folder correctly.

Given how Synology works (which it does work very well with NFS),

  1. Create a username plex on the Syno even if you don’t run PMS on it.
  2. Now give user plex permission to read & write the appropriate shares (mounted directories).

What happens here is:

  1. NUC sends read/write request as user plex
  2. Syno sees user plex and uses that name for permission validation.
  3. Sees user plex is permitted to read (or write) and completes the request.

Synology creates directories with no permissions by default.
It relies on its proprietary ACL / database mechanism to validate.
On the Syno, NFSD / BIOD runs as root so permission bits & UID/GID do not matter.

IF UID/GID matching is desired:

  1. After creating user plex on the syno, manually edit its /etc/passwd to match
  2. On Linux, mount with sec=sys to enable full UID/GID mode.
  3. Now , as root, on the NUC side, set permissions as you would for any normal linux mount.

If you want to push the performance curve (I have 10 GbE)

# dvr-movies
vienna:/dvr         /vie/dvr          nfs sec=sys,intr,rw,vers=4,timeo=15,rsize=1048576,wsize=1048576,auto,async,x-systemd.after=network-online.target,nofail,bg 0 0

Also remember to increase the default NFS read/write block size to 32k (Control Panel - NFS - Advanced )

Thanks ChuckPa, helpful as always. I was able to get this to work. I had to modify a few things following this guide. But I got everything working now.

Synology GUI:

  • Create group: plex
  • Create user: plex
  • For each share in NFS rule enter following:
    Hostname or IP: address of your machine
    Privilege: Read/Write
    Squash: No mapping
    Security: sys
  • Control Panel > File Services > NFS > Enable NFS > Enable NFSv4.1 support > NFSv4 domain:
  • Advanced Settings
    Read packet size: 32kb
    Write packet size: 32kb

Synology SSH to Synology as admin:
sudo su
cp /etc/group /etc/group-date +"%Y%m%d.bak
vi /etc/group
Edit: plex:x::plex
cp /etc/passwd /etc/passwd-date +"%Y%m%d.bak
vi /etc/passwd
Edit: plex:x:::Plex User:/var/services/homes/plex:/sbin/nologin
chmod 777 /volume1/{nfsshare1,nfsshare2,nfsshare3}

Linux server:
cp /etc/fstab /etc/fstab-date +"%Y%m%d.bak
vi /etc/fstab
Edit: <SYNOLOGY_IP>:/volume1/ / nfs sec=sys,intr,rw,vers=4,timeo=15,rsize=32768,wsize=32768,auto,async,x-systemd.after=network-online.target,nofail,bg 0 0

That’s an UGLY way.

Be advised, Having used this guide, you are committed to dealing with permissions by hand as applying 777 disables all sense of Synology’s ACLs.

My solution works within the existing DSM framework.

If I don’t include the 777 permissions then I have the same issue. I have tried setting user and group read/write permissions for plex user and the plex group for the DVR share using Synology ACL’s. The folder gets created with the correct owner but with no permissions.

Synology doesn’t assign permissions on files or directories by default. that’s how they do it Everything is done through their database (Control Panel - Shared Folders - EDIT the share - Permissions tab)

d-----+ for a directory
------+ for a file

If you want to take over, SETUID & SETGID bit usage is recommended.
by doing so, permissions and user/group are preserved in all subordinate files and directories.

But shouldn’t Plex be setting permissions then? Plex is creating the directory when I schedule a new recording. But because the directory that is created has no perms it will fail to copy the recorded file over to this new folder until I manually change the perms to make it writeable.

They should be getting the default umask on the individual files.
Is that what’s not happening?

Can you get in at the shell and show me?

I was kinda thinking it might be a umask issue as well. But when I checked the plex user that was created in Ubuntu it has a “/usr/sbin/nologin”. So my understanding is that “should” inherit the default umask. Should I change this account to a normal account so I can try and setup a umask or might that screw up some other things? I can share whatever is needed just let me know what you need to see.

If you want to add an override to set the umask, you’re more than welcome to.

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