Jump to content


Photo

FreeNAS plugin


  • Please log in to reply
1069 replies to this topic

#1061 edevils OFFLINE  

edevils

    Newbie

  • Members
  • 2 posts
  • Local time: 12:29 PM

Posted 09 October 2019 - 08:41 PM

Yes, that is true, but I did that and it does not work... I posted a log in one of the previous posts

 

I second this post. 

 

My issue is not with FreeNas, but the Emby plugin.  A post above stated that installing the emby plugin is the way to go.  This is the process I followed, and emby automatically created the jail.  Even with the jail created and the shares available via FreeNas, emby was not able to find the videos.  It's rather frustrating that a thorough guide was never created for noobs.  Further, it's bad customer service to simply reply that, "you need a better understanding of Linux".  Although this is true in a broader sense, my knowledge of FreeNas is sufficient enough that I was able to install the plugin and have the jail created via the plugin. 

 

Ultimately, there are quite a few people looking for the same assistance that I am, but it feels like nobody actually wants to take the time and create a thorough guide on how to install and configure emby for FreeNas. 

 

That's okay, but you have to understand that if you want a greater adoption rate, you have to listen to the potential customers asking for a guide.  And yes, most of us don't know too much about FreeNas, but that is exactly why we are posting, for help.

 

Personally, I could have tried Plex on Windows and probably would have saved the headache, but I wanted to give emby on FreeNas a go in order to hopefully learn the FreeBSD operating system a little bit better, and evaluate emby.  I've since replaced FreeNas with Windows 10 since I'm more familiar with the OS.


Edited by edevils, 09 October 2019 - 09:24 PM.


#1062 makarai OFFLINE  

makarai

    Advanced Member

  • Members
  • 502 posts
  • Local time: 06:29 PM

Posted 10 October 2019 - 01:56 AM

I am not sure whom you are replying too. However, I am quite sure i never said you need more understanding of linux in order to get emby running. I might have said that FreeNAS is a storage solution first and a VM solution second, so you need to figure some things out.

 

Back to your problem. When i read problems with "cant see folder" i always think its a permission problem, because thats what my experience tells me.

 

Typically it boils down to that emby is installed with the user UID 989 and GID 989 and the first user of freenas has the UID 1000 with the GID 1000, naturally your first user (if you are not inclined to deal with permissions) creates datasets and creates the movie folders and what not. When you mount these datasets they can not be seen from the emby side.

 

There are two solutions that i can fathom.

1. Change the UID and GID the emby user is running as (easy requires 4 lines copy and paste in the emby shell) 

or.

2. Create a seperate user emby in freenas with UID:GID 989:989 that owns your media datasets.

 

 

 

For 1. open the emby plugin shell and replace 1101 with the userid you want

service emby-server stop
pw groupmod emby -n emby -g 1101
pw usermod emby -n emby -u 1101 -g 1101
chown -R emby:emby /var/db/emby-server
sysrc 'emby_server_user=emby'
service emby-server start

The 2nd. one is more involved with clicking through the GUI, I posted a simple terribly written pdf a day or so ago here https://emby.media/c...e-2#entry794468

 

Most of these permission problems happen with all the plugins that need access to data, thats just the nature of the jail/freenas system and the option for the user to give each individual tool access to specific data. My personal data security is just terrible, as i am also just a click through the gui user so I have one user with the uid 1101 that does pretty much everything.


Edited by makarai, 10 October 2019 - 02:04 AM.


#1063 makarai OFFLINE  

makarai

    Advanced Member

  • Members
  • 502 posts
  • Local time: 06:29 PM

Posted 10 October 2019 - 05:42 AM

I prepared two documents during my lunch break:

 

The documents are quick and dirty but i hope they are easy to follow

Usecase 1:

You have an elaborate file structure and have users created and want that emby can read and write to your data

Attached File  Installing Emby Plugin.pdf   576.78KB   19 downloads

 

Usecase 2:

You want to have a seperate emby user and create a new dataset that emby can access.

Attached File  Install Emby Plugin from Scratch Freenas.pdf   559.65KB   10 downloads

 

If someone want the word document and make them pretty, send me pm. I usually work with laTex to write documents so word is not my thing.


Edited by makarai, 11 October 2019 - 04:36 AM.

  • bizarro252 likes this

#1064 DLD OFFLINE  

DLD

    Member

  • Members
  • 18 posts
  • Local time: 05:29 PM

Posted 10 October 2019 - 12:30 PM

I replied to soloam, i think haha :D

 

However have you tried mounting a single movie first and checked if that can be found?

Who were you replying to in your last posts?

 

I'm not sure what you mean by "However have you tried mounting a single movie first"?

 

Do you mean copying a movie to the Plugin location?

 

I tried removing the Emby Plugin and installing the Plex Plugin. It also cannot see any files. But it also did not bother to tell me what it was doing during the scan i.e. what file types it was looking for.

 

Most of my files are .TS files that were recorded using a TV Card but I also copied some other files into the folder to try and determine whether Emby and Plex don't like .TS files.



#1065 MRobi OFFLINE  

MRobi

    Advanced Member

  • Members
  • 270 posts
  • Local time: 01:29 PM

Posted 10 October 2019 - 03:11 PM

@makarai That would have been me who said a better understanding of FreeNAS is required, which is true as I'm seeing a lot of posts lately specifically regarding permissions on FreeNAS. This is not anything Emby can control, it is simply how the FreeNAS operating system works.

 

@edevils You say your issue is not with FreeNAS and it is with Emby, however the issue you describe is 100% in the way FreeNAS is designed to work. You have to remember, FreeNAS is a file system first and foremost with the option to run plugins. It's nothing like Windows or MacOS and was never intended to be a point and click type of system so there's definitely a learning curve with it, and it can be overwhelming while you're still learning it.

 

When you install Emby on FreeNAS, regardless of whether it is installed via the plugin or the shell, it gets installed into a jail. This is true of every plugin installed on FreeNAS. A jail is in essence a mini system running completely on it's own inside of a larger system. It runs in it's own little world inside the jail with no access to anything outside of it, hence the name jail. This is why you have to mount your files into the jail just so it can see they exist. The problem comes when you have a program (Emby) running inside that jail that is trying to read these files. This same problem will occur with Sonarr, Radarr, Lidarr, SabNZBD, Transmission, Plex....

 

When you first created your dataset in FreeNAS, you would have created a user and a group that the file system is assigned to, lets for fun say you named them both edevils. Because all of these plugins run inside their own little mini system (jail), the plugins are completely oblivious to what you chose as your user/group for your files. When the jail is created and the plugin installed, the plugin is given a user and group of it's own. In this case, it's emby and emby. If your user or group that you initially chose don't match exactly with what the plugin runs, the plugin cannot read/write/execute your files. This is why you need to go through that step of setting permissions for your files. Again, this is completely on the FreeNAS side of things and is completely different for every single user because each user chooses their own user/group for their file system. You also have to do this exact same step with Sonarr, Radarr, Lidarr, etc.. etc.. etc. 

 

Over on the FreeNAS forums, they do have a thread dedicated to giving plugins permission to your files. To complicate matters more, there are multiple ways to do this and that all comes down to user preference. For example, Makarai uses user permission, I use group permission. So a guide written by him would look completely different from a guide written by me. You could even set your dataset to 0777 which gives everybody permission to do everything (not recommended of course since many of these jails will be exposed to the internet). Here's that thread on permissions 

https://www.ixsystem...our-data.27273/

 

Once you grasp the concept of FreeNAS permissions in jails, you'll be much better prepared to tackle setting up other jails with other plugins. But unfortunately jail permissions are not a "one size fits all" solution. 

 

Now with all of that said, I see you went back to Windows 10 as an OS. There's an Emby server for Windows as well that's still a million times better than Plex will ever be ;) Don't give up on FreeNAS completely though, once you figure out the basics it really does make a great system. You can even create a virtual machine to run Windows in FreeNAS :)



#1066 MRobi OFFLINE  

MRobi

    Advanced Member

  • Members
  • 270 posts
  • Local time: 01:29 PM

Posted 10 October 2019 - 03:17 PM

Who were you replying to in your last posts?

 

I'm not sure what you mean by "However have you tried mounting a single movie first"?

 

Do you mean copying a movie to the Plugin location?

 

I tried removing the Emby Plugin and installing the Plex Plugin. It also cannot see any files. But it also did not bother to tell me what it was doing during the scan i.e. what file types it was looking for.

 

Most of my files are .TS files that were recorded using a TV Card but I also copied some other files into the folder to try and determine whether Emby and Plex don't like .TS files.

Emby definitely supports .TS files, there is no issue there. Some players may require transcoding to play them, but that all depends on your end device hooked to your TV.

 

The reason neither Emby or Plex can see your files is because of the permissions in FreeNAS. Emby runs as 1 user and your files are owned as a different user. You need to give the Emby user permission to see these files. Makarai just posted up a nice pdf that touches on this. You can also take a look at this post about permissions on the FreeNAS boards https://www.ixsystem...our-data.27273/

 

If you can get us the user id and group id of your dataset for your files, we can help you with the exact code you need to get permissions setup and working.



#1067 DLD OFFLINE  

DLD

    Member

  • Members
  • 18 posts
  • Local time: 05:29 PM

Posted 10 October 2019 - 03:58 PM

Emby definitely supports .TS files, there is no issue there. Some players may require transcoding to play them, but that all depends on your end device hooked to your TV.

 

The reason neither Emby or Plex can see your files is because of the permissions in FreeNAS. Emby runs as 1 user and your files are owned as a different user. You need to give the Emby user permission to see these files. Makarai just posted up a nice pdf that touches on this. You can also take a look at this post about permissions on the FreeNAS boards https://www.ixsystem...our-data.27273/

 

If you can get us the user id and group id of your dataset for your files, we can help you with the exact code you need to get permissions setup and working.

 

Thanks for the reply. My first thought was permissions which is why I made sure that the folder was world read. I had a quick look at the PDF and I get the idea of what to do. What I don't get is why world read is not enough? Does world read not mean anyone can read the files?

 

My priority in setting up FreeNAS was a location to store the files and I've never really spent any time reading about who should own them. When I installed FreeNAS I did so with a username the same as the one I use on Windows as I understood that made permissions etc easier. I've always planned to sort that out. At the moment the TV recording is happening on a Windows machine. I then edit the .TS files and move them to FreeNAS. At some point I will set-up a Linux based TV recorder and use the FreeNAS box just for file backup.

 

I haven't got my brain around how such things should be set-up from login/ownership/permissions point of view so any advice would be much appreciated.



#1068 MRobi OFFLINE  

MRobi

    Advanced Member

  • Members
  • 270 posts
  • Local time: 01:29 PM

Posted 10 October 2019 - 07:41 PM

Thanks for the reply. My first thought was permissions which is why I made sure that the folder was world read. I had a quick look at the PDF and I get the idea of what to do. What I don't get is why world read is not enough? Does world read not mean anyone can read the files?

 

My priority in setting up FreeNAS was a location to store the files and I've never really spent any time reading about who should own them. When I installed FreeNAS I did so with a username the same as the one I use on Windows as I understood that made permissions etc easier. I've always planned to sort that out. At the moment the TV recording is happening on a Windows machine. I then edit the .TS files and move them to FreeNAS. At some point I will set-up a Linux based TV recorder and use the FreeNAS box just for file backup.

 

I haven't got my brain around how such things should be set-up from login/ownership/permissions point of view so any advice would be much appreciated.

It should yes...

 

Can you log into the FreeNAS GUI, go to Storage, Pools, click the 3 dots at the end and select "Edit Permissions" and post a screenshot of your user, group and permissions that are set.

 

Setting up Windows shares from FreeNAS is a whole other monster. And why not just configure Emby to do your recording for you once you've got everything all setup. It'll save you all the hassle of having to manually move files around.



#1069 bizarro252 OFFLINE  

bizarro252

    Advanced Member

  • Members
  • 135 posts
  • Local time: 10:29 AM

Posted Yesterday, 01:22 PM

@makarai

Thanks for putting those guides together, I too had some permission struggles at the beginning :)

Question though, in the 'from scratch' guide you mention when talking about mounting folders to the jail:

"

Add mount points 3dots ->add mountpoints -> actions add mount point

Use the mouse do not type: click the folder and navigate!
"

 

I think I typed into the Destination to create structures within the jail, is this bad practice?  Should you create the 'folders' within the jails dataset and navigate to them instead of typing them in?

 

 

Thanks!



#1070 makarai OFFLINE  

makarai

    Advanced Member

  • Members
  • 502 posts
  • Local time: 06:29 PM

Posted Yesterday, 04:31 PM

@makarai

Thanks for putting those guides together, I too had some permission struggles at the beginning :)

Question though, in the 'from scratch' guide you mention when talking about mounting folders to the jail:

"

Add mount points 3dots ->add mountpoints -> actions add mount point

Use the mouse do not type: click the folder and navigate!
"

 

I think I typed into the Destination to create structures within the jail, is this bad practice?  Should you create the 'folders' within the jails dataset and navigate to them instead of typing them in?

 

 

Thanks!

 

In the end as long as you find your folders from within the jail everything is dandy, its your choice. I wrote it in away because its less prone to errors :D


  • bizarro252 likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users