LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2019, 05:30 AM   #1
rockhopper_penguin
Member
 
Registered: Oct 2013
Location: Amsterdam
Distribution: Debian
Posts: 61

Rep: Reputation: Disabled
Plex media server permissions


Hi all,

I run Manjaro (latest-stable). I successfully installed Plex. I have other computers and laptops in the house running ubuntu, manjaro and arch from where I like to stream content from this media-server.

The thing is, this computer holds a 3tb disk with content which is accessible through /run/media/carl/WD3TB. As expected carl is owner, but plex needs permission to access it: /run/media/carl/WD3TB/Movies /TV-Shows /Music are the folders that Plex needs to access.

I tried to usermod -a -G plex carl and I also tried chown-ing those folders. However plex cannot access them and spits a permission error out. Please I know there must be a simple solution to this problem, I have really next to nothing in experience when it comes to user-management and folder-permissions so I can use a pointer or two.

Thanks!

Last edited by rockhopper_penguin; 01-15-2019 at 09:43 AM.
 
Old 01-13-2019, 09:15 AM   #2
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
Perhaps this link may help : https://support.plex.tv/articles/200...issions-guide/


I would suggest starting from permissions 777 for all

# chmod -R 777 /run/media/carl

and then trimming down the permissions as needed.
 
Old 01-13-2019, 10:44 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ i don't think that's a very good way to go about it.

your original post is not completely clear; is plex running on the same machine as the one containing the 3TB drive?
what do plex logs say about the problem?
is plex running as user plex?
what are the actual permissions & ownership of the files in question?
show us some output. use code tags. thank you.
 
Old 01-14-2019, 02:24 AM   #4
rockhopper_penguin
Member
 
Registered: Oct 2013
Location: Amsterdam
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
^ i don't think that's a very good way to go about it.

your original post is not completely clear; is plex running on the same machine as the one containing the 3TB drive?
what do plex logs say about the problem?
is plex running as user plex?
what are the actual permissions & ownership of the files in question?
show us some output. use code tags. thank you.

Let me clarify this:
  • Yes Plex runs on my SSD which holds the operating system (Manjaro Linux). In that same computer there is another physical harddrive (HDD) which is WD3TB.
  • Plex sets itself up as 'plex' for which it makes a new user called 'plex' by default.
  • Permissions are in the code tag as is the status from systemctl.
  • I also included the plex logs in a screenshot, it just loops what can be seen in the picture-attachment.

Code:
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/plexmediaserver.service.d
           └─override.conf
   Active: active (running) since Mon 2019-01-14 08:57:55 CET; 11min ago
 Main PID: 337 (Plex Media Serv)
    Tasks: 74 (limit: 4915)
   Memory: 191.8M
   CGroup: /system.slice/plexmediaserver.service
           ├─337 /opt/plexmediaserver/Plex Media Server
           ├─521 Plex Plug-in [com.plexapp.system] /opt/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.14.1.5488-cc260c476 /opt/plexmediaserver/Resources/Plug-ins-cc260c476/System.bundle
           ├─819 /opt/plexmediaserver/Plex DLNA Server
           ├─820 /opt/plexmediaserver/Plex Tuner Service /opt/plexmediaserver/Resources/Tuner/Private /opt/plexmediaserver/Resources/Tuner/Shared 1.14.1.5488-cc260c476 32600 /waitmutex
           └─860 Plex Plug-in [com.plexapp.agents.imdb] /opt/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.14.1.5488-cc260c476 /opt/plexmediaserver/Resources/Plug-ins-cc260c476/PlexMovie.bundle

jan 14 08:57:55 bedroom-pc systemd[1]: Started Plex Media Server.
Code:
total 19535124
drwxrwxrwx  14 carl root             4096 14 jan 09:02 .
drwxr-x---+  3 root root               60 14 jan 09:01 ..
-rw-------   1 carl autologin 20003880960  3 jul  2014 360_HDD_Image.bin
drwx------   8 carl autologin        4096 17 aug  2017 backup
drwxrwxr-x  23 carl autologin        4096 19 aug  2017 Books
drwxr-xr-x   3 root root             4096 28 jun  2014 boot
drwxrwxr-x   7 carl autologin        4096 18 aug  2014 Cds
drwx------  19 carl autologin        4096 24 apr  2018 Data
drwxrwxr-x   2 carl autologin        4096 18 aug  2017 LiveSets
drwx------   2 carl root            16384 24 jun  2014 lost+found
drwxr-xr-x   2 carl autologin       12288 27 mei  2018 Movies
drwxr-xr-x   3 plex carl             4096 12 jan 00:19 Music
drwxr-xr-x   2 carl autologin       12288 24 jun  2014 Music Videos
-rw-r--r--   1 carl carl                0 14 jan 09:02 perm.text
drwxr-xr-x  54 carl autologin        4096 11 jan 16:18 Series
drwx------   5 carl autologin        4096 24 jun  2014 .Trash-1000
Thanks for helping!
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2019-01-14_09-04-15.png
Views:	76
Size:	193.9 KB
ID:	29460  
 
Old 01-15-2019, 12:35 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
so the ls -al is for /run/media/carl/WD3TB, yes?

please describe the actual problem.
what is happening?
the plex log screenshot does not contain anything pertaining to any sort of problematic behavior, and i expect that there's much more log to got through. maybe better if you find the actual text file.

then you can find out which groups user plex and user carl belong to; i suspect you suffer from a variation of a very common server problem, and one solution is to have a common group between two users.

does plex need read and/or write access???

BTW: have a look at these search results! maybe the solution is out there, on plex' own pages, for you to find!
 
Old 01-15-2019, 03:05 AM   #6
Arslan Latif
LQ Newbie
 
Registered: Jan 2019
Posts: 1

Rep: Reputation: 0
Smile

Permissions on Plex Media Server. This is a write up of how permissions on Linux systems affect Plex Media Server and how it affects its ability to find you media. What are permissions. When accessing the filesystem of any Linux system, all files and directories are equipped with a set of permission bits.
https://forums.novell.com/showthread...uxeo?p=2076098
 
Old 01-15-2019, 06:51 AM   #7
alexpaton
Member
 
Registered: Jul 2009
Distribution: Ubuntu & ClearOS
Posts: 163

Rep: Reputation: 47
I had similar problems when trying out Emby and Plex. I couldn't even see the drives with data on, from Plex or Emby, in order to add libraries. The first step is to change the mount options for the data drive in fstab. I am not on my home computer at the moment, so can't check which options I set; however, I believe that I mounted as <username>:users, and set the Users and RW options.

I believe that I also ran the following afterwards, from the folder above the mount point:-
Code:
sudo chown -R <username>:users <mountfolder>
It is important to run chown from the folder above the mount folder, so that the root folder of your data folder is also available.

Of course, you don't want your data ONLY accessible from plex, so if you mount like this, you will need to add the plex user to the users group, rather than chowning to the plex user.

The plex guide that is linked above, seems to imply that you should set the ownership to plexlex, but that sounds insane to me, as adding new content into a folder, would have you running through hoops.
 
Old 01-15-2019, 09:43 AM   #8
rockhopper_penguin
Member
 
Registered: Oct 2013
Location: Amsterdam
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: Disabled
Okay I got it to work. Though I'm not completely happy with the solution.

Set all directories that are needed to carl:carl (chown/chgrp). Made plex part of group carl (usermod). Chmod-ed those directories to 750.

It's working now. Woul've rather not made plex a part of carl-group, but whatever.
 
Old 01-15-2019, 10:44 AM   #9
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by rockhopper_penguin View Post
Set all directories that are needed to carl:carl (chown/chgrp). Made plex part of group carl (usermod). Chmod-ed those directories to 750.

It's working now. Woul've rather not made plex a part of carl-group, but whatever.
You probably should have made those directories carl:<group_of_plex> then ONLY those directories can be seen/read by plex, not all other dirs/files of carl. No need to change the group plex is running IN although it may need setgid (set group ID right, to make it running AS that group) bits.
 
Old 01-16-2019, 04:24 AM   #10
rockhopper_penguin
Member
 
Registered: Oct 2013
Location: Amsterdam
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ehartman View Post
You probably should have made those directories carl:<group_of_plex> then ONLY those directories can be seen/read by plex, not all other dirs/files of carl. No need to change the group plex is running IN although it may need setgid (set group ID right, to make it running AS that group) bits.
Yeah that would've been the better solution. Now if plex ever where to be exploited it would grant the exploit read/write access to my files and directories. However, this will be a dedicated plex/kodi-server, so I'm not too worried about it. In the future I will work around this.

Thank you all, for all your suggestions!
 
Old 01-23-2019, 05:52 AM   #11
dobradude45
Member
 
Registered: Dec 2013
Posts: 42

Rep: Reputation: Disabled
Hi there

I know not an answer to your question - but why not try KODI. Also on a CLIENT box Kodi can read DVD's (menus and all) direct from iso rips and play them. I've found using KODI as a clent on an amazon fire TV box (it's an android device) it works brilliantly for streaming files etc from my CENTOS box to remote TV's. You can easily install KODI or any other apps on an android device from your android phone and use the app2fire on the phone which will install the app to the fire tv stick (or other android device).

I set samba up to share the files so the client application can play -- KODI plays even more formats than VLC believe it or not and subtitles are a breeze for movies -- you can add opensubtitles.org, subscene.com or wherever you get subtitles from. Plex was always hideous for subtitles. You don't even need a music server on your Linux box done this way. Just set the client KODI app up for video and music -- "Seeemples!!!".

Using SAMBA for file sharing keeps control over the whole kybosh too very easily.

Cheers
-D

Last edited by dobradude45; 01-23-2019 at 05:54 AM.
 
Old 01-23-2019, 11:55 AM   #12
rockhopper_penguin
Member
 
Registered: Oct 2013
Location: Amsterdam
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: Disabled
Hi Dobradude45,

I use kodi but I have a plex server to stream stuff from. There is a kodi addon that allows you to play stuff from plex, so you can have it the kodi-way too. The thing is I have a multilevel house and only one room has a large capacity for TV-shows and movies, I want to be able to play those things from other devices. For other family members as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Review Plex Media Server For Linux, Sync Media Across All Of Your Devices LXer Syndicated Linux News 0 02-29-2016 12:51 PM
Plex Media Server on Slackware64 Gee Man Slackware 1 10-01-2012 06:12 PM
LXer: Plex Media Server + Roku = Awesome LXer Syndicated Linux News 0 08-27-2012 12:30 PM
LXer: Plex Media Server + Roku = Awesome LXer Syndicated Linux News 0 08-13-2012 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration