Cannot delete some files

Server Version#: 1.16.0.1226
Player Version#:n/a

I run a PMS on a Ubuntu 18 machine. The media files are on a Synology NAS 918+ shared through a nfs mount on the Ubuntu machine.

I can delete some shows/movies but some i can’t. It looks like the ones that i can delete are owned by kasper:kasper and have been added since this server was setup.

The tv series i cannot delete have been transferred from various other systems; for example external HD’s from before i owned the NAS.
So it looks like a permissions issue with old files. Everything that is added to Plex today is fine.
Yesterday i changed the permissions for all files in the media location mount on the Ubuntu machine to the same owner as the files that i can delete. But i still can’t delete these series through plex. I can delete them through the terminal but i would prefer to do it through plex itself.
Weird thing is i can’t see anything relevant in the logs at the moment so i am not even 100% sure that this is a permissions issue.

If you can’t delete them from within a Plex app, Plex doesn’t have permission
Entirely a permission issue on the Synology side; User plex (or whichever username you’re running Plex as) doesn’t have write permission to the directory containing the files.

It seems like a little bit of sudo command line work and you’ll get all the ownership settings and perms straightened out in short order.

@ChuckPa Can you elaborate on what “sudo command line work” would be needed to get this fixed?

I can sort of find my way around the teminal but am certainly not an expert.

Without knowing the details of your configuration, exact commands are impossible.
You will need the basic chmod commands.

What I find easiest is to create a matching UID for my username on the NAS.
This allows me to maintain my UID as owner (facilitating easy media addition and removal without sudo). This works best with sec=sys nfs mount option.

I then do a little group management and assign Plex the group field. Next extend R/W to the group.

Here’s the Linux tips. It will help you become better at the command line (really needed in Linux)
as well as address common Plex-related tasks.

The most important here is the ‘Inheritance’ How-To.
It shows how to setup management (automatec) and make life generally easier.

You will likely want to give them all a good read.

https://forums.plex.tv/tags/server-linux-tips

@ChuckPa Thank you. I have read through the mounting nfs shares and decided to redo that. However I have several docker apps (sonarr/radarr/sabnzbd) running and don’t want to create permission issues for those apps.

Furthermore i am wondering if this might be caused because the nfs mount is in my home directory (which i prefer) as in your example you use /nas /nas/movies etc. Does this make a difference?

I also see you mount as /nas/movies /nas/tv etc.

This is my current mount line in etc/fstab:
192.168.1.116:/volume1/opslag /home/kasper/opslag nfs user 0 0

Last question is there a reason you don’t use bash to do this?

I never mount System-level shares in a home directory. To my thinking, that’s poor form.

You’re creating a system wide (including docker app) accessible resource (the mount point).
Why not create a /Syno/ directory and then subdirectories for each share?

This would make admin a snap. Using my Syno IP as the example here:

192.168.0.23:/volume1/movies   /syno/movies    nfs  defaults,rw,nofail,sec=sys,async,bg 0 0

I’m sure you’ll find those mount options interesting.
Remember sec=sys should only be used when you have matching UIDs between Linux host(s) / docker container PUID and the UID on the Syno (which you can edit if you want to brave that /etc/passwd at the shell)

With this setup, when I added the QNAP, it became trivial

/qnap/movies, etc etc

Now (and this is where it’s sneaky) ln -s /qnap /nas

Everything refers to /nas (your docker volume maps) but you’re able to move them thanks to the symlink on the outside

@ChuckPa Thanks! I have followed the mounting NFS steps in this post:

I can now delete tvshows and movies again. However afterwards i created a new mount for “tech videos” following the same steps including permissions.

I noticed a ls -l shows that the owner of /Nasje/TVShows and /Movies is kasper but the owner of /Tech-videos is root:root
drwxr-xr-x 5 root root 4096 Jun 20 22:50 Nasje
drwxrwxrwx 154 kasper kasper 12288 May 27 22:31 Movies
drwxrwxrwx 111 kasper kasper 4096 Jun 20 04:59 TVShows
drwxr-xr-x 5 root root 4096 Jun 20 22:51 Tech-videos
Wonder where i went wrong here?

Go to the server side, Fix it there. Remount. It will propagate across.

@ChuckPa Hi, I know this is kind of a old topic by now. However the Plex side of things is now working. But for some reason i discovered today that the Sonarr app (in a docker container) can no longer move files to the NAS:
Access to the path “/tv/SIX” is denied.

all permissions are set to 755 per the guide. In the docker environment PUID and GUID is set to my user 1000

Any idea what might be causing this?

If the docker is unchanged, and the mounts are unchanged, The synology is NAS is next.

Just follow the chain. Somewhere, UID 1000 is no longer allowed to write OR, because of changes on the docker host, has been remapped to a UID which can’t write on the NAS

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