Extremely Frustrated About Permissions

I set up a PMS on a fresh Ubuntu install a couple of weeks ago. I’m using FireTV 4k on every TV in the house.

All was fine with initial setup, recordings worked, commercials deleted, etc., but there was a strange lag a few seconds after switching channels, and the video (not audio) would hang after the place where a commercial was removed. All media (archives added at install and DVR recordings) were on a spinning USB hard drive. I decided to try creating a new library solely for DVR recordings that was on the system drive, which is an SSD. This is where the issues began. Recordings were completed as scheduled, but SOME recordings were not available via Android or FireTV apps. After much frustration I decided that my experiment was a failure and moved recordings back to the original USB hard drive. Now nothing will record. Everything fails with an error message about “no write access.”

There are dozens upon dozens of “guides,” forum posts, random articles, etc. about permissions, but no SIMPLE, definitive guide FROM PLEX around permissions, groups, etc. Think “for dummies” style. As with most folks, I don’t have time or energy to figure out all the ins and outs and experiment (because that’s what I’ve done for days now, to no avail), but simply want to know what settings are appropriate/correct on a fresh/standard Ubuntu install.

I currently have an unusable system and am at my wits end. ANY help would be greatly appreciated.

I have set up the PMS as per the standard install instructions. I have not changed the user that runs the PMS, though my permissions and ownership is a huge mess at this point.

1 Like

https://support.plex.tv/articles/200288596-linux-permissions-guide/

It is a guide and it comes from Plex themselves…

Btw this is not Plex’s fault but a feature of all unix-based OSes… I guess you have to invest a bit of time and energy to learn about permissions if you want to stay happy in the future.

2 Likes

I have seen this, yet it is not, as I (and many others) asked for, a simple guide. A textbook does not help this situation I described. For a simple, standard, base install there are absolutely defined settings. This is what I would like to see.

EDIT: Yes, I realize that my ask is lazy, however, the seemingly endless “guides” found on these forums and others are contradictory and not definitive. I don’t think it’s too much to ask for a simple standard guide from Plex themselves to go alongside the more broad/lengthy “textbook” about permissions, ownership, etc.

3 Likes

Well, every case is different. I have no clue how the paths to your library-folders are, you didn’t tell.

But the guide is pretty clear on this:

chmod 755 /plexmedialibrary

and

chown -R megatron /plexmedialibrary

replace /plexmedialibrary with the respective folders and megatron with the user that runs plex (mostly “plex”).
You might add sudo in front of both commands since you might not have the right to do it as your current user.

Edit: It is lazy and it is not highly appreciated if you want other users to do the work simply because you don’t want to invest any effort. I understand that Linux can be complicated at first, I am also relatively new in the business, but the willingness to invest a minimum amount of time and energy is what other people expect from you. Also, if you don’t want to spent time on it, why do you use an OS that you obviously have no clue about? There will be other problems which might arise in the future where you end up in the exact same situation like now.

2 Likes

I laid out specifically what my install is like. I ran these two commands (as sudo) and the ownership still shows me and my group having ownership, rather than the plex group. And recordings are still failing.

I’m not completely green (been using Ubuntu for nearly 10 years), yet admittedly I have never been able to wrap my head around permissions and ownership. I completely understand the security implications, yet this info is rarely provided in an easy to digest format.

EDIT (to your edit): There is no reason that a simple guide cannot be provided. It doesn’t help every use case, but in the case of following the standard install guide it would help folks to know what “should” be correct rather than every possible iteration. It’s helpful in learning, not expecting others to do the work.

And thank you. I do appreciate your help and feedback.

2 Likes

No you didn’t. There is no path shown in your post. USB hard drive and system drive are not enough as information if you expect to get copy/paste lines. You didn’t post any ls -l output so one could see what the present permissions are.

Not asking for copy/paste lines, just more info and direction than that guide provides.

Total standard “out of the box” Ubuntu install. My media drive (containing the TV and Movies folders) is on /media/$USER/Media_Drive.

I followied the directions provided when I wanted to move my media from the SSD back to the drive noted above. This is what is causing the issue. An addendum with items to look out for or correct would be helpful to folks.

EDIT: present permissions are $USER:$USER and neither the chown or chgrp makes any changes. And no errors are thrown up when I run them.

Show me an ls -l of your library folders.

Btw. if you would have read the guide I posted right to the end, under “Quickguide” is everything that you need. The rest is just for education what the stuff does and the reason why it exists.

I’m trying, but you don’t need to keep smacking my hand here. I’m trying to be nice and have expressed my appreciation. No need to be mean.

I noted above that I have specifically run those commands in the quickguide.

ricko@rickoserver:~$ ls -l /media/ricko/Media_Drive
total 72
drwxrwxrwx 1 ricko ricko 8192 Jul 19 19:39 Movies
drwxrwxrwx 1 ricko ricko 0 Jul 5 11:25 ‘Music Videos’
drwxrwxrwx 1 ricko ricko 65536 Jul 25 08:30 TV
ricko@rickoserver:~$ ls -l /media/ricko/Media_Drive/TV
total 65666828
drwxrwxrwx 1 ricko ricko 20480 May 21 2017 ‘12 Monkeys’
drwxrwxrwx 1 ricko ricko 0 Oct 12 2015 ‘Absolutely Fabulous’
drwxrwxrwx 1 ricko ricko 40960 Jul 24 08:43 ‘Adventure Time’

Here you can see what the permissions at the top level look like, as well as the first few folders contained within.

EDIT: I have repeatedly tried to change ownership to plex:plex and it doesn’t happen. Also, the plex user is part of the ricko group.

Sorry 'bout being rude. Let’s start fresh:
sudo chown -R plex:plex /media/ricko/Media_Drive/TV
sudo chmod -R 755 /media/ricko/Media_Drive/TV

I am not sure whether you can already do this with /media/ricko/Media_Drive/ (not a linux pro myself), so I would do the command above simply to the other library folders like /media/ricko/Media_Drive/Movies.

1 Like

Tried the below after running the chmod command as well and the same output as this:

ricko@rickoserver:~$ sudo chown -R plex:plex /media/ricko/Media_Drive/TV
ricko@rickoserver:~$ ls -l /media/ricko/Media_Drive/TV
total 65666828
drwxrwxrwx 1 ricko ricko 20480 May 21 2017 ‘12 Monkeys’
drwxrwxrwx 1 ricko ricko 0 Oct 12 2015 ‘Absolutely Fabulous’
drwxrwxrwx 1 ricko ricko 40960 Jul 24 08:43 ‘Adventure Time’

I have tried all of this on the top level of the drive as well as the individual folders.

Does the user plex exist? awk -F: '{ print $1}' /etc/passwd
you can also have a look into top which user runs PMS.

Apart from that, your folders all have 777 permission, so everyuser should be able to write in it. Is the drive mounted writeable?

1 Like

ricko@rickoserver:~$ awk -F: ‘{ print $1}’ /etc/passwd
root
daemon

gdm
ricko
cups-pk-helper
plex

Deleted users not relevant to the conversation.

According to top, plex is the user running PMS.

Can you create a dummy file with touch /media/ricko/Media_Drive/TV/test?

Honestly I have no clue why chown does not work…

HA! What filesystem is the drive? Something non-Linux? Fat32/NTFS? If yes, you cannot change permissions because it is not supported by the respective filesystem…

First:
ricko@rickoserver:~$ touch /media/ricko/Media_Drive/TV/test
ricko@rickoserver:~$ ls -l /media/ricko/Media_Drive/TV/test
-rwxrwxrwx 1 ricko ricko 0 Jul 26 07:51 /media/ricko/Media_Drive/TV/test

Second: that’s what it is. I swear that when I set this up, I gathered the drives I had media on and wanted to use on this server and made sure they were all formatted as ext4. Apparently I missed one.

It’s going to take awhile and I have to leave for work, but I will try moving media, reformatting, and check all this again. Oddly it worked when I first set up the server, but when I moved dvr recordings back from the SSD, I ran into this issue.

Thanks again for your help. I’ll update the thread once I change the drive format.

It should work anyway. I guess… The folders all show 777 permission so every users should be able to write into it. Maybe I am wrong…

Did everyone forget that Gnome & Nautilus claim ownership of /media and mounts all devices using GVFS in /media ? :slight_smile:

GVFS mounts are exclusive access to your username and login session. When you log out, Nautilus unmounts it.

TL;DR

  1. Mount in a directory other than /media using /etc/fstab
  2. Point PMS at that directory
  3. N.S.D.
2 Likes

This came to my mind, but a bit too late it seems. And surely my Linux skills are nowhere near yours Chuck :smiley:

Just a quick “thank you” to both of you for your help. I finally set the drive to mount via fstab and moved the mount point out of /media. A couple of test recordings worked this morning.

Much appreciated!

@rickstone and all.

PLEASE avail yourselves of server-linux-tips whenever you have an issue.

These are How-To threads I’ve done of some of the most common, and most frustrating, things anyone using Linux needs to know with PMS.

I even have one in there about permissions management which is really slick and helps with DVR recording :slight_smile:

1 Like