Plex DVR (Beta) - No write access to destination

I set up Plex DVR a little while ago, and I started trying to record a few shows, but I get the error “No write access to destination” on every show I attempt.

I’m running Ubuntu 16.0.4 LTS, and I’m using an HDHomeRun Connect. The tuner is working because I can stream the shows live on the HDHomeView application. I have my files on an external hfsplus drive, which has worked fine for all other plex functions. I can read and write to that drive, and Plex reads perfectly from its directories.

In /etc/fstab, the drive has the following:

UUID=......... /media/external hfsplus defaults,auto,nofail,user

I had also tried with

UUID=.......... /media/external hfsplus defaults, uid=1000,gid=1000,umask=0022,fmask=0022 0 0
but neither of those permissions work. Any ideas?

Move it away from /media. Ubuntu has the nasty habit of taking exclusive control.

I always recommend something obvious like /disks .

Gnome will take exclusive access to anything it mounts but Ubuntu seems to want all of /media. I never understood why they do.

`

I will certainly try that when I have access to my server again - would you recommend a specific set of permissions or do either of those work fine? I’m surprised that this problem surfaces mainly with the DVR, but I guess that has to do with write access.

@ChuckPA said:
Move it away from /media. Ubuntu has the nasty habit of taking exclusive control.

I always recommend something obvious like /disks .

Gnome will take exclusive access to anything it mounts but Ubuntu seems to want all of /media. I never understood why they do.

This solution did not work for me, are there any other suggestions?

Filesystems are mounted at boot, effectively as the superuser (root). Permissions and ownership takes over from there.

If your drive is mounted on /mnt/drive1, the do the following:

cd /mnt

Then

ls -l

Paste the output here.

Also, do:

cat /etc/password | grep plex

Paste the output here.

@mwang said:
I will certainly try that when I have access to my server again - would you recommend a specific set of permissions or do either of those work fine? I’m surprised that this problem surfaces mainly with the DVR, but I guess that has to do with write access.

DVR is the only function which writes to a library. As such, it is the only function of PMS which needs write access to somewhere

The quickest adjustment for you, if all your media files are owned by you (e.g. chuck:chuck) is to:

  1. add user plex to the chuck group.
  2. change the permissions on all needed directories to permit writing by plex:chuck. and setting the sticky bit

This would be done as:

chmod 0775 /some/media/dir
chmod g+s  /some/media/dir

The first one sets the directory permissions.
The second one sets the sticky bit so all files written in the directory assume the group value of the directory (which is your group)

Files will appear (as example)

drwxr-xr-x    2 chuck chuck       4096 Jun 17  2015 You Only Live Twice (1967)/
drwxr-xr-x    2 plex  chuck       4096 Feb 18 01:33 Zero Days (2016)/

drwxrwxrwx 93 plex share 4096 Jun 23 12:09 Movies
drwxrwxrwx 8 plex share 4096 Jun 24 14:12 Tv

plex:x:1002:1000:,:/usr/share/ftp:/bin/sh

ok I have tried everything including going full 777 and I cant get plex to write to my nas drive just keep getting drive is not writeable same thing with a usb drive attached to the shield and help would be awesome the above is from ls -l and cat /etc/password | grep plex

@Tripic said:
drwxrwxrwx 93 plex share 4096 Jun 23 12:09 Movies
drwxrwxrwx 8 plex share 4096 Jun 24 14:12 Tv

plex:x:1002:1000:,:/usr/share/ftp:/bin/sh

ok I have tried everything including going full 777 and I cant get plex to write to my nas drive just keep getting drive is not writeable same thing with a usb drive attached to the shield and help would be awesome the above is from ls -l and cat /etc/password | grep plex

If the NAS is blocking write access, you must look to its access control tool and give plex permission to write. By default, Plex only needs permission to read. It sounds like you want to record or optimize media. For this, it needs write permission to the destination.

I gave plex full access and am trying to record but it keeps doing the same thing the drive mounted is under admin account and has full access

Where is the NAS mounted? Under /media ??

I need to know how you have the NAS mounted. NFS? SMB?

Please share more details of how you have it configured.

mounted under tv/plex/ and smb3

sorry shares/tv/plex/

If this is indeed SMB protocol (you implied above), Go to the Windows server and open up the read/write permissions

OR

create a credentials file with username and password in it man mount.cifs and add this to the mount in place of the UID= GID= options.
Your alternative is to put username and password in the mount options directly if you don’t mind them being plaintext.

It’s possible that it’s mounted “read only”. This would essentially mean that the user-level permissions are irrelevant if the network-level permissions are blocking it. Check the SAMBA settings on the NAS and see if there’s something there that’s blocking it.

I mount all of the remote filesystems via NFS and ensure that I use “no_root_squash” in the parameters to ensure it mounts with full permissions.

The option defaults mounts it as rw on this (client) side. Any READ-ONLY status is at the server.

I’ve relocated this to the DVR section as there might be something I am unaware of (don’t use DVR features at this time)

@Tripic said:
I gave plex full access and am trying to record but it keeps doing the same thing the drive mounted is under admin account and has full access

What does this mean? Are you referring to the account that you’re using on the Windows / SAMBA side to mount the share? Or, are you referring to the account you’re using on the linux side?

How have you verified that you have “full access”? Have you tried

touch /path/to/share/somefile

That will show you if the drive itself is writable.

This did the trick. I changed my mount point to disks/external, and then I modified the ownership of the directory of just the DVR content to plex:[username] and that allows plex the access to that directory and allows for recording. Thanks!

@ChuckPA said:

@mwang said:
I will certainly try that when I have access to my server again - would you recommend a specific set of permissions or do either of those work fine? I’m surprised that this problem surfaces mainly with the DVR, but I guess that has to do with write access.

DVR is the only function which writes to a library. As such, it is the only function of PMS which needs write access to somewhere

The quickest adjustment for you, if all your media files are owned by you (e.g. chuck:chuck) is to:

  1. add user plex to the chuck group.
  2. change the permissions on all needed directories to permit writing by plex:chuck. and setting the sticky bit

This would be done as:

chmod 0775 /some/media/dir
chmod g+s  /some/media/dir

The first one sets the directory permissions.
The second one sets the sticky bit so all files written in the directory assume the group value of the directory (which is your group)

Files will appear (as example)

drwxr-xr-x    2 chuck chuck       4096 Jun 17  2015 You Only Live Twice (1967)/
drwxr-xr-x    2 plex  chuck       4096 Feb 18 01:33 Zero Days (2016)/