I’m just trying to get pms running in Ubuntu or LM because Windows sucks, but I can’t for the life of me understand the permissions of Linux. I’ve used Linux off and on for a few decades now, but I’ve never had to worry about permissions of internal or external drives and folders, they were just alway there and I always had full read and write abilities.
When I’m setting up pms, and I go to add a folder, I can see the drives in the list, but I can’t see any of the contents of the drive, such as the movies or tv shows folders. I’ve see countless instructions about permissions, but my eyes get crossed pretty fast as it’s all long winded descriptions that are driving me to tears. All I want is for any and every user that has physical access to the system to have full, unfettered access to any and all drives and folders on the system. The only thing the computer and drives connected to it are used for is media files, no personal documents or pictures or anything like that. I don’t want to have to worry about setting permissions for anything on the computer, ever.
This How-To will allow everything to be read. You, as owner of the files, will have read-write.
Linux is a multi-user operating system. granting unfettered access to everything for everyone WILL lead to failure because someone touched the wrong thing
In Linux Tips you’ll find other How-To’s showing different ways you might need to bring your media to PMS.
I had already come across that before I even posted here. The computer is one user, and one user only, and will only ever be one user and one user only. I just want every user to have full access. Period. All stop.
I’m following the directions, and after I make the /disks directories, it has me do ls -la /disks and make sure the permissions are 0755, but I don’t know where I’m supposed to see those numbers.
“/” is the very top level directory. When you do an ‘ls -la” you see the permissions and ownership. Permissions are ‘r’ for read, ‘w’ for write, ‘x’ for execute, which for most people just means you can change to the directory. Here is an example from my system:
drwxrwsr-x. 18 napolij plex 4096 Oct 29 12:25 plex
this means napolij can read, write & execute
anyone that is a member of the plex group can read, write & execute.
anybody else can only read and execute
the 755 comes from binary terminology. If you think of those features from my settings, they are
on on on → 1 1 1
on on on → 1 1 1
on off on → 1 0 1
in hexadecimal, that is 775, 755 would indicate that anyone in the group can’t write to that directory or the files below it.
I’m sorry, but you are really confusing me. I’m quite frankly not looking to learn here, I just want this to work.
I’m at this point in the directions, and it says run ls -la /disks, and this is what I get:
total 24
drwxr-xr-x 6 david david 4096 Oct 29 18:06 .
drwxr-xr-x 21 root root 4096 Oct 29 18:06 ..
drwxr-xr-x 2 david david 4096 Oct 29 18:06 12tb01
drwxr-xr-x 2 david david 4096 Oct 29 18:06 12tb02
drwxr-xr-x 2 david david 4096 Oct 29 18:06 satassd
drwxr-xr-x 2 david david 4096 Oct 29 18:06 seagate
Then is says:
Having created the directories as root, verify empty (unmounted) directory permissions are 0755 before mounting
but I don’t know how to check that because I don’t see those numbers in the output of ls -ls /disks.
Sorry that I’m confusing you.. Certainly not my goal. I think those directories (12tb01, 12tb02, etc) are what is under /disks. If you want to see the permissions on /disks, try “ls -lad /disks”.
the drwxr-xr-x is the permissions. Says its a directory with 755 permissions. You, as user david, can read, write, and execute. Anyone in the “david” group, but not you can read and execute those directories but they can neither add or delete media. That is the same for any other user on the system that is not you and not in the david group. You state that their is only one user, presumably you but I think you just mean one login user. Your plex media server is most likely running as user plex and group plex and is not you of course and probably not a member of group david. Based on what you posted, I think the plex service should be able to see what is in your media directories. But that will depend on what /disks is set to.
I installed it to run Plex, nothing more, nothing less. It’s a mini PC and that is and will always be it’s sole purpose. I’ve ran Linux as as my daily off and on since 2000, but I’ve never tried to do anything other than use it as a basic computer, never tried to run Plex on it, and never had to deal with drive permissions as every USB hdd/ssd/flash drive I’ve plugged in has always worked for whatever I needed it to, whether NTFS, FAT32, ExFAT, EXT1/2/3/4.
On Linux, During installation, I configure it as follows:
Has its own UID/GID
Connects to the transcoding hardware if the hardware is detected.
It has no permissions to see files/directories except those which you grant, either by facl or GID permisions. (this is to protect your files from accidentally being scanned by PMS)
As such, for PMS to see your media files, you must expressly grant said permissions.
Those permissions How-To’s are listed in Linux Tips for:
local disks
NFS shares
SMB/CIFS shares
(My workstation has one user (me). It has, however, multiple other UIDs running for the various system services of which Plex Media Server is one of them)
What you see here is the automounter ( and Nautilus ) mounting the usable partitions for you.
On Ubuntu, you will see these under /media. On Redhat, you’ll see these under /run/media
The fundamental problem begins here.
The automounter mounts ALL THESE DEVICES with EXCLUSIVE access to your username ONLY. When only doing things for you and your desktop – that’s fine.
It doesn’t work however when you have another UID (Plex) which needs access.
This is what you must change.
You need to
UNMOUNT the partition,
Make an alternative place for that drive/partition to be mounted
Make an /etc/fstab entry (UUID style as shown) to mount the partition.
After doing this, the partition will no longer be under exclusive mount control of the automounter (your UID). This is how Plex’s UID can get access to it.
(I’ve been using Linux since 1999. Got hold of a prelim release and loved it. Never looked back)
I actually understood all that, I was just confused on how to know if the driver permission were 0755 as the output of ls -la /disks didn’t show those numbers. I would have more helpful if the instructions would have said that I should see drwxr-xr-x.
You have to understand, this mini PC’s sole purpose is for Plex. It won’t have any personal files on it, so loosing the data on a drive would merely be an inconvecience. It won’t have Chrome. I won’t be logging into my Mozilla account for Firefox. No password managers. It won’t be logged into anything other than my Plex account for PMS, and I’ll log out of my Plex forum account once it’s all up and running.
I have several Mini-PCs (Ubuntu server - No GUI) which I run PMS on.
The MIni-PC has the OS and PMS only
The media is NFS mounted from the NAS
I log into the MiniPC using SSH (easiest) because I get the basic command line
Without a GUI, the MiniPC is blazing quick when compared with GUI encumbrance.
As for file permissions,
Directories get 755, files get 644
If I were to reset all the permisions for all my media in bulk, it would be:
find /nas/media -type d -exec chmod 755 {} \;
find /nas/media -type f -exec chmod 644 {} \;
Now I know that my username has full RW permisions. Everyone/Everything else has read-only.
If you want to run that way, you’ll want to look at the NFS or CIFS/SMB network media mounting How-To as a reminder
I have a hard time in CLI interfaces as my eyes quickly cross and my brain starts short circuiting. I need precise instruction for this kind of stuff as I have a hard time parsing it all together from reading a bunch of different pages.
So, just to confirm:
rwxr-xr-x 6 david david 4096 Oct 29 18:06 .
drwxr-xr-x 21 root root 4096 Oct 29 18:06 ..
drwxr-xr-x 2 david david 4096 Oct 29 18:06 12tb01
drwxr-xr-x 2 david david 4096 Oct 29 18:06 12tb02
drwxr-xr-x 2 david david 4096 Oct 29 18:06 satassd
drwxr-xr-x 2 david david 4096 Oct 29 18:06 seagate
I’ll also suggest that when mounting the USB drives via /etc/fstab, that you add “nofail” to the mount options for those drives. If you don’t, if a drive is unplugged or not powered on when booting the min-pc, the OS will hang trying to mount the missing drive. Ask me how I know, lol!
I keep a thumb drive plugged into my plex server to back up config files. I had it set up to mount via fstab. Well, I had it unplugged one time and had to do a hard reboot and my system hung. At first I thought the hard reboot had corrupted something but after a few tries realized it was because the thumb drive was missing.