Server Version#: ?
Player Version#:
I had Plex installed on my laptop running Linux, but owing to some problems I re-installed everything from a Live-USB backup. My media is stored on an external disk. After the re-installation of Linux from the backup, Plex does not see the directory where my media is kept. I tried re-installing Plex, uninstalling it completely and re-installing it, but the problem continues. The installation process indicates a number of errors as shown below.
The following NEW packages will be installed:
plexmediaserver
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/75.7 MB of archives.
After this operation, 193 MB of additional disk space will be used.
Selecting previously unselected package plexmediaserver.
(Reading database ... 295683 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.32.6.7557-1cf77d501_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.32.6.7557-1cf77d501) ...
Setting up plexmediaserver (1.32.6.7557-1cf77d501) ...
PlexMediaServer install: PlexMediaServer-1.32.6.7557-1cf77d501 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: New
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: render
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
PlexMediaServer install: Intel i915 Hardware: Found
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
useradd: group plex exists - if you want to add this user to that group, use -g.
PlexMediaServer install: ERROR: Cannot create user "plex". Error: 0
groups: âplexâ: no such user
usermod: user 'plex' does not exist
PlexMediaServer install: ERROR: Cannot add 'plex' to video group 'render'. Error: 0
PlexMediaServer install: WARNING: Could not add 'plex' to video group 'video'. Error 0
usermod: user 'plex' does not exist
chown: invalid user: âplex:plexâ
PlexMediaServer install: ERROR: Cannot set ownership of '/var/lib/plexmediaserver' to user 'plex:plex'. Error: 0
PlexMediaServer install: Plex Media Server: ver PlexMediaServer-1.32.6.7557-1cf77d501 - Installation failed. Final configuration not performed.
PlexMediaServer install: Assistance is available in our Support Forums.
PlexMediaServer install: both
Processing triggers for desktop-file-utils (0.26-1) ...
dpkg: error processing package plexmediaserver (--configure):
installed plexmediaserver package post-installation script subprocess returned error exit status 255
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Errors were encountered while processing:
plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
Apparently the plex:plex user may not have been removed by the Plex uninstall.
Anyway, Iâm appealing for help. Thatâs what the installation script suggests too!
EDIT: After some effort I managed to install Plex with no errors reported. However, It doesnât find my media folders when I try to add a library. It doesnât show me all folders on my system. Itâs probably a permissions problem, but I donât know exactly how to change them. I had it working before the re-installation, but I donât what steps I took to make it work. It took me along time and in the end I donât recall exactly what I did.
If I send you a PM, would you please share a few files with me?
Thereâs no reason for these errors to pop up.
There is something causing a complete meltdown of the script.
This is running as root ??
As for permissions, where is the media and what are the directory permissions.
755 is the best to use for basic permissions to get you started.
(644 for files ) with you being the owner of the media and the media files NOT mounted by the automounter
I read the guide as carefully as I could, but honestly as useful as it is about permissions, it doesnât end with concrete instructions for the layman about what to do.
@ChuckPa I would greatly appreciate any help you can give me. Itâs so frustrating not to get it working!
Iâm not running Plex as root, if this is what you mean.
The media is on a partition on an external disk attached to my laptop. The disk also happens to have another partition formatted to NTFS, but my partition is formatted as ext4. It works in all other respects anyway. The path to the media folder is /media/my-username/My-Backups/TV. I tried all sorts of permissions, but only on the My-Backups and TV folders.
Plex never runs as root (unless you override the default installation)
Which distro are you using.
You referred to NTFS.
If youâre trying to install on NTFS using WSL â you wonât have much luck.
WSL / WSL2 isnât strong enough to run a minimal Debian environment
That explains the contractions about user plex existing and then not existing.
Is this what youâre doing?
(You didnât say which distro & version youâre using â That info would be really helpful)
On any supported Linux, PMS just installs and runs.
It will configure the directories (/var/lib/plexmediaserver) and go
Permissions are very simple but WILL get caught up if the Automounter (Gnome/Nautilus) is doing the mount because that blocks plex from seeing the media .
Iâm running Plex on MX Linux. Whatâs irritating me is that despite a few problems that I had when I first installed it, I managed to get it working. I recall it was something to do with permissions, but unfortunately I didnât take notes because I was very tired after many hours of trying to get it to work.
When I re-installed MX Linux I had a different problem and I changed the permissions on the partition that has my media files directory on it. This is what must have broken it.
I used to have Plex on Windows and thatâs why the disk already has an NTFS partition on it.
Plex is happily working in all other respects except in seeing my media directory. It only sees a few other directories, certainly not my Home directory (as it shouldnât I guess).
Please let me know what other information would be helpful.
EDIT: The permissions on my path to the media directory are as follows:
ls -al /media
drwxr-xâ+ 6 root root 4096 Oct 16 23:54 media
ls -al /media/fred
drwxr-xr-x 12 fred fred 4096 Oct 17 00:50 fred (that is My-username)
ls -al /media/fred/My-backups
drwxr-xr-x 4 fred fred 4096 Oct 17 01:21 TV
ls -al /media/fred/My-backups/TV
drwxr-xr-x 3 fred fred 4096 Oct 17 01:21 (name of directory)
MX bothers me but as long as it doesnât bother â ok for now.
As for your media, Mounting NTFS for Plex to use takes a few steps.
Because of that. I have a How-To already written.
Please take a look and see if it helps.
Youâre correct. Plex should not see your home directory not anything else youâve not expressly given permission to (thatâs how Linux works â ultra strict)
Hereâs the link to the How-To.
Donât hesitate to ask if youâve any trouble following.
Thank you for the link. I think I confused you about NTFS. Itâs really irrelevant to the problem other than that an NTFS partition resides on the same external disk where I have my MX data partition which is formatted as ext4.
Iâm trying to get Plex to see the directories in my ext4 partition. Did the permissions list that I posted earlier give any clue?
you want plex to get into the directories on the mounted drive / partition, right?
Whether internal or external, NTFS, EXT4. AFS. BTRFS, XFS or even ZFS the permissions of the mount point directory matter
In the How-To I linked. Scroll down to step âCâ.
Look at this part⊠Itâs critical
Having created the directories as root, verify empty (unmounted) directory permissions are 0755 before mounting
This applies to other partitions you are going to use for media with Plex.
The system apps are all root â so that doesnât matter.
You own everything so already have permission.
Plex is unprivileged so you have to open
â first the mount point
â then mount the partition
â lastly confirm the permissions again with the partition mounted and into the subdirectories
I have a few commands to help you fix permissions for your media inside the EXT4 partition when youâre ready
Thank you! Iâm going through the procedure, but I donât understand the critical point that you emphasize. The directory /disks has the following permissions:
ls -al /disks
total 8
drwxr-xr-x 2 fred fred 4096 Oct 17 06:14 .
drwxr-xr-x 20 root root 4096 Oct 17 06:14 ..
Is this correct?
Hopefully weâll get it to work with my external disk!
# Pluggable devices are handled by uDev, they are not in fstab
UUID=b84d9028-4638-429b-a165-6148f4973cc0 / ext4 noatime 1 1
UUID=F89B-A1C5 /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
/swap/swap swap swap defaults 0 0