Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

FreeNAS Plex plugin not allowing me to add folders.

Joined
Oct 7, 2019
Messages
11
Thanks
0
#1
In the Plex Media Server (PMS) (after setting everything up and add the mounting points) I go to create a new Library (in the Plex GUI). I start to set up a Library called Movies and it ask's for the folder that the media is in (which should be the folder you added the mount point for right?). I can see the folder I mounted but it is grayed out and I can't select it. So I type in the path manually and Plex adds it, however it responds with "There are no items in this library " even though I know for sure that there are movies in that file. I've been trying to fix this for about 3 days and I've re-installed the plugin, followed tutorials, and yes I've tried turning the system on and off again. Is there a tutorial that addresses this problem or a post or something that doesn't lead to a dead end? Also If I make a new dataset (in FreeNAS) and set up the sharing and mount points, the PMS will show the new folder to be grayed out still. I've made a user called "plex" and it has access to the dataset's however it seams to do nothing. I've posted some pictures of what is set up. Don't mind the references to Portal as this FreeNAS is being used for an AI project. Any help will be greatly appreciated because all I want is to just watch my movies.
 

Attachments

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#2
Could be a permission problem. Can you open a shell in your plex jail and post the output of ls -ld "/Plex Media Server/GLADOSMedia"
(Inside [code][/code] tags, please)
 

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#4
You need to add read permissions for the plex user to that folder.

You can add these permissions from the FreeNAS shell by either using the setfacl command or if
this is a single user system it's probaby easier to make the folder and the contents world readable with
chmod -R o+rX <path_to_your_folder>/GLADOSMedia
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#5
I tested the chmod command and it didn't work. It just gave me a usage output for chmod. So I did some research and if I change the folder with the chmod command to, lets say read only access, will I still be able to write/read from windows? I'm using this dataset for both storage and for a media server. I'm not very experienced with FreeNAS and it's commands, I'm learning as I go.
 

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#6
You did replace <path_to_your_folder> with your actual path, didn't you?

Learning is a good thing. The chmod command will not affect the access from windows, as it will only affect the others permissions,
see the documentation about permissions. The plex user is not the owner nor in the group, so adding read permissions for others will
allow the plex user to access the directory.
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#7
This is the command I put into the FreeNAS shell:
chmod -R o+rX /mnt/GLaDOS/iocage/jails/plex/root/Plex Media Server/GLADOSMedia

This is the output:
chmod: Media: No such file or directory
chmod: Server/GLADOSMedia: No such file or directory
 

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#8
The error message explains what wrong, you just need to read and understand the output. What you are doing is to chmod the three arguments "/mnt/GLaDOS/iocage/jails/plex/root/Plex", "Media" and "Server/GLADOSMedia".

A space separates the arguments. You'll either need to escape the spaces with a backslash or put the whole path in quotes
(like I did with the ls command in my first post).

Or make use of command-line completion when entering the path, this will automatically escape the path correctly.
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#9
I just figured out that spacing problem and when I put in the correct command it says "Operation not permitted" after everything.
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#10
I also tried using the sudo command with it and still "Operation not permitted". I don't know why this plug is being a pain. It worked just fine before then all of a sudden it doesn't.
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#11
Ok this is interesting. I was navigating around in the plex jail shell and I was able to cd into GLADOSMedia. To my surprise I can read/write data via shell. Once finding out that it can access GLADOSMedia I tried going to the plex gui to add a new library. However it still shows up as a grayed out file that I can't click on. My conclusion is Plex has read/write access but not at the same time? How come I can access the file in shell but not in the gui?
 

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#12
How come I can access the file in shell but not in the gui?
In the shell you probably are root, while the Plex GUI is running as plexuser.

The problem here is related to the ACLs of the directory (indicated by the "+" in the drwxrwx---+ permissions).
See also this post here. You should post the ACLs of that directory using the getfacl command.
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#13
Here is the getfacl command output:

root@GLaDOS[~]# getfacl /mnt/GLaDOS/ApertureScience
# file: /mnt/GLaDOS/ApertureScience
# owner: plex
# group: Media
owner@:rwxpDdaARWcCos:fd-----:allow
group@:rwxpDdaARWcCos:fd-----:allow
everyone@:--------------:fd-----:allow
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#16
root@GLaDOS[~]# getfacl /mnt/GLaDOS/ApertureScience/Movies
# file: /mnt/GLaDOS/ApertureScience/Movies
# owner: LabBoy
# group: Media
owner@:rwxpDdaARWcCos:fd----I:allow
group@:rwxpDdaARWcCos:fd----I:allow
everyone@:--------------:fd----I:allow
 
Joined
Oct 7, 2019
Messages
11
Thanks
0
#17
I've been banging my head on this problem for about a week now and I have other projects to work on. If the solution to this problem is to literally learn all the commands and how everything works then clearly this plugin is broken. Although I did find a solution, delete plex and use another program for streaming. If someone finds the solution to this I'll be happy to know what it is.
 

Fredda

FreeNAS Experienced
Joined
Jul 9, 2019
Messages
118
Thanks
24
#18
The chmod as root can fail if ACLs are in place. You'll need to add read permission via the setfacl command.
Or remove them completely with the -b switch, after that the chmod command should work.
 
Joined
Oct 14, 2019
Messages
1
Thanks
0
#19
There isn't an issue with the plugin. This is a function of using a windows share and Freenas preventing you from breaking things via chmod. Either update via setfacl or change them via the share itself on the windows system.
 
Top