You have to make sure that the user plex
has access not only to the drive, but the folder that the drive is mounted in. After a lot of tinkering I wound up going this route:
Edit the Mount Options (Disks -> "More Actions" (the two gears under the "Volumes" map) -> Edit Mount Options) such that:
nosuid,nodev,nofail
is in the area for storing the options in the /etc/fstab file (the textbox under "Symbolic Icon Name")
and set the Mount Point to be:
/media/<user>/<HDD Name>
and remount your HDD so that it will appear in the specified location.
Next, add yourself to the plex
user group by going to the Terminal and enter:
sudo adduser "$USER" plex
Now, you can modify the ownership of the relevant files and directory so that they are owned by ${USER}:plex
. You can give plex read-access to the drive by going to the Terminal and enter:
sudo chgrp plex "/media/${USER}/"
sudo chmod g+rX "/media/${USER}/"
sudo chgrp plex "/media/${USER}"/<HDD Name>/
sudo chmod g+rX "/media/${USER}"/<HDD Name>/
It may also be necessary to ensure that ACL permissions are properly configured, so the following might also be necessary:
sudo setfacl -m g:plex:rx /media/<user>/
FYI: If a file/directory displays a +
symbol as part of its permissions (e.g. drwxr-xr-x+
) that means that ACL controls are active for that file/directory.
Now that Plex has access to the drive, you need to make sure that it has access to all files in the relevant directories. This can be done by repeating the following for all of your media library folders:
chmod -R g+rX /media/<user>/<HDD Name>/<Library Folder>
This solved my issues for the two extra drives I've added to my HTPC. Hope it helps.
PS: As @douggro mentioned, Plex has a good article on the subject, but they changed up the structure of their site, so it took me a while to find it from his link, so here's a more current link to the page: Plex Linux Permissions Guide
I got it to work here are my steps for anyone else looking for an answer.
downloaded plex for ubuntu on the plex website.
installed via software manager
downloaded unsupported appstore on github. It was a zipfile.
I ran command
sudo chown username:username /var/lib/plexmediaserver/Library/"Application Support"/"Plex Media Server"/Plug-ins
I extracted the zip file there in the plugin folder.
Then you have to change the name of the unsupportedappstore.master-bundle to unsupportedappstore.bundle
run command:
sudo mv /var/lib/plexmediaserver/Library/"Application Support"/"Plex Media Server"/Plug-ins/unsupportedappstore.master-bundle /var/lib/plexmediaserver/Library/"Application Support"/"Plex Media Server"/Plug-ins/unsupportedappstore.bundle
That will rename the appstore plugin.
change back the permission of plug in folder
sudo chown -R plex:plex /var/lib/plexmediaserver/Library/"Application Support"/"Plex Media Server"/Plug-ins/
lastly restart plex
sudo service plexmediaserver restart
Best Answer
Welcome to DIY software. :) Fortunately getting things like this right is one of the strengths of Ubuntu.
Before I offer up some of my opinions on the matter I'd just like ensure you've considered the following.
1 - Plex can be considered sluggish, but I have only seen this when it's running on a low powered CPU. This may in your case be to do with it running in a virtual machine, but I'd need more information on how much CPU and memory and what type of disk you run to be able to give you a solid answer on that. (Try increasing the number of CPU cores available to the Virtual Guest and ensure it has 1-2GB Memory).
By nature, Plex is a streaming and transcoding service, this means lot's of CPU is needed unless you have every file pre-optimised into a format that your client can play in 'direct' mode. This includes subtitles which invoke transcoding and definitely slow down slower Plex Servers. In addition, clients like televisions may not support many codecs natively and you guessed it, this may also be forcing a transcode more than often.
2 - Yes Samsung has somehow broken their Plex software in their store and there are quite a few comments about in on the web. It has been that way for some time, so your best bet is to go to Samsung Support for that, or get a separate client (an easy to set up and cheap solution is the Raspberry Pi 2 - I have a guide for it here). It works remarkably well.
3 - With regards to Plex not 'seeing' things, the normal suspect is that linux file permissions are not set properly. Have you tried chmod and chown on the media files you wish to include in the Plex Library?
Alternatives
Alternatives come down to what experience you really want and how much effort you want to spend to set it up. Plex and Kodi are really the best media centres around. Microsoft used to do one but it has now been discontinued. That said, you can also set up a simple DLNA sever and buy dozens of DLNA chinese media players from your local PC store. What these don't have however is nice menu systems like Plex and Kodi do.
Plex is essentially the same as Kodi EXCEPT that Plex has a true client server architecture. In fact the Plex clients were all based on Kodi / XBMC clients anyway. If you have a simple disk with media on it, then go ahead and use Kodi. If you want to display things in multiple rooms in the house, Kodi can do it with some MySQL tweaking, but actually Plex is the simplest and easiest.
I have a guide on Plex for Windows on my site and one on installing Plex for Linux Headless here. The linux headless guide should be your pick if you want a solution that is as far away from being sluggish as you could imagine. Since you already know Ubuntu, I'd say this would be the way to go.
Let me know if you want any help, I will respond to queries on that site.
Hope this helps you and Merry Christmas. :)
Marshalleq