5

I have tried adding a directory outside my home directory. /media/plex and soft linked my /Videos directory to it.

I have also added plex to udev group and also to my user group

uid=124(plex) gid=135(plex) groups=135(plex),46(plugdev),1000(marrabld)

and

uid=1000(marrabld) gid=1000(marrabld) groups=1000(marrabld),4(adm),20(dialout),24(cdrom),46(plugdev),116(lpadmin),118(admin),124(sambashare),128(vboxusers),135(plex)

marrabld is my username.

the permissions on the softlink are

drwxrwxrwx  2 plex plex 4096 Apr 30 21:14 plex

But no mater where I tell plex to look, cannot see any directories in : /Videos ; /media/plex/* or any usb drives I plug in

If I sudo su plex I cannot see anything in my users home directory either.

The permissions in my Videos directory are

drwxr-xr-x

for all of them.

XBMC can see all of the files no problem.

I have tried the solutions here :

Plex Media Manager won't find /media/Movies or /media/TV internal HDD

and

Plex won't enter my home directory or other partitions

and a whole bunch of other places with no joy.

Any help would be appreciated

Caustic
  • 749

4 Answers4

3

As per its default configuration, Plex uses the Plex:Plex user and group, and will have issues accessing directories if that user / group doesn't have the proper permissions to do so. To work around that problem (Ubuntu 23.04 Plex Vers. 4.108.0)

I created the override configuration file sudo systemctl edit plexmediaserver

Added the following lines to the start of the file,

[Service]
User=
User=<user>
Group=
Group=<group>

and saved it as /etc/systemd/system/plexmediaserver.service.d/override.conf

Now Plex will have access to the directories, but will no longer have access to its own directory...and will fail to start. So we need to change the owner of the Plex directory as well to the <user> and <group>

sudo chown -R <username>:<group> /var/lib/plexmediaserver

Finally run sudo service plexmediaserver restart to restart the service

and run systemctl status plexmediaserver.service to check its status.

1

The issue is that Plex creates a new user "plex" on installation. This user doesn't have permission to read in your user folder. The easiest solution is to add the user plex to your group:

sudo usermod -a -G yourUserName plex

and restart plex:

sudo service plexmediaserver restart

Now, plex should be able to read the files in your home folder and share them in your local network to other DLNA devices.

0

Based on Mounting NTFS Drives on Linux:

  1. Add ntfs-3g permissions,auto option to /etc/fstab. This will enable chmod.
  2. chmod your folders/drives to drwxr-xr-x.

This helps with one remark; it didn't work till I got one thing: user (plex) can't get access to a folder if he can't get access to it's parent folder/mount point.

If you got your NTFS partition /mnt/ntfs_partition link, the above will work. But if you got /media/%username%/ntfs_partition you have to chmod not only ntfs_partition to drwxr-xr-x, but also %username% as well. In my case it was drwxr-x--- so user plex was out.

Elven
  • 111
-1

Is it just plex can't find your files or find your directories?

I had a similar issue where plex just wouldn't find any of my files I had in my directories. The issue is likely due to the plex user not having the correct permissions.

Open this config file:

sudo nano /etc/default/plexmediaserver

Find this line:

PLEX_MEDIA_SERVER_USER = plex

Replace plex with your username, and save the file. Once I restarted my computer, Plex was able to access the folders on the external drive.

You may be able to run sudo service plexmediaserver restart instead of rebooting.

Let me know if this works