Emby not finding individual media files, or Seasons

Status
Not open for further replies.

zirophyz

Dabbler
Joined
Apr 11, 2016
Messages
26
Hi guys,

Seems like a permissions problem with the emby plugin. Network engineer by trade, I have some nix experience and I'd like to think enough to get myself into trouble (and occasionally out).

So, I've installed the plugin via the UI. This all works fine. I've mapped storage to the jail and this seems fine too. I connect to the emby jail (jexec # /bin/tcsh) and can browse to my media via the mapped path, can get all the way into TV Shows, Seasons and view episodes. While in the jail, I su to emby and can confirm I can view everything (well, get into directories etc).

To achieve this, I added the emby user and emby group into FreeNAS UI with the same user and group numbers that the jail emby user was using. This is 989:989. All of my media dirs and files are owned by media:media (816:816) to allow Sonarr/Couchpotato etc to read/write. Everything has permissions of 774 (rwxrwxr). The emby user has media as a secondary group, but it's primary group is emby.

I also have my own personal user, it has it's own group but secondary group of media as well. That user can read/write files that are owned by media:media just fine. I've kind of done the same with the emby user, just matched the ID's of the user already in the jail, which I believe the emby daemon is running under.

So, in Emby itself it will find all my shows, movies, artwork etc fine but when you go into a show it's Seasons are empty. Seems like it just isn't finding either the eps or maybe it can't get into the Season dirs (assuming it won't display empty Seasons). Seeing as though I can't replicate this issue using the emby user in the jail I'm starting to run out of ideas. Maybe I need to change the emby daemon to run as media:media?

Would love help if anyone else has faced this or could potentially help me out where I've mucked up permissions! :) TIA.
 

zirophyz

Dabbler
Joined
Apr 11, 2016
Messages
26
root@emby_1:/ # pw usershow emby
emby:*:989:989::0:0:Emby:/nonexistent:/usr/sbin/nologin
root@emby_1:/ # su emby
This account is currently not available.


My bad, I was using the emby user in the plain BSD terminal, not when I was in the jail as above.

[root@zion] /mnt/vol0/Storage/Media/TV# pw usershow emby
emby:$6$Wh4FXuurVL.QBfJH$frOd2EzRCJNia0tyBccCT6o1bZm3wzphCgSTtnhdjMSUys9g5NrWshIhwVS3rKZn3TLjHunQK1k7Jz9TKbTT7/:989:989::0:0:emby-server:/nonexistent:/bin/csh
[root@zion] /mnt/vol0/Storage/Media/TV# su emby
emby@zion:/mnt/vol0/Storage/Media/TV % cd iZombie/
emby@zion:/mnt/vol0/Storage/Media/TV/iZombie % cd Season\ 1/
emby@zion:/mnt/vol0/Storage/Media/TV/iZombie/Season 1 % ls -la
total 3408239
drwxrwxr-- 2 media media 41 Aug 26 2015 ./
drwxrwxr-- 5 media media 17 Sep 11 23:22 ../
-rwxrwxr-- 1 media media 109555 Aug 17 2015 iZombie - S01E01-thumb.jpg*
-rwxrwxr-- 1 media media 266598795 Aug 17 2015 iZombie - S01E01.mp4*
-rwxrwxr-- 1 media media 1245 Oct 13 05:09 iZombie - S01E01.nfo*


So, you can see from the emby user, with same UID as the one in the jail I can browse just fine...
 

zirophyz

Dabbler
Joined
Apr 11, 2016
Messages
26
The output above seemed to get cut off and I didn't get a scrollbar, so here is truncated version;

[root@zion] /mnt/vol0/Storage/Media/TV# pw usershow emby
emby:...:989:989::0:0:emby-server:/nonexistent:/bin/csh
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Maybe your folders need to be 775?
"The executable bit for a directory has a slightly different meaning than that of files. When a directory is marked executable, it means it is possible to change into that directory using cd(1). This also means that it is possible to access the files within that directory, subject to the permissions on the files themselves."
https://www.freebsd.org/doc/handbook/permissions.html
 

zirophyz

Dabbler
Joined
Apr 11, 2016
Messages
26
Unfortunately, that didn't work. The way I understood is that emby has that secondary group of 'media'. Since the files and dirs are owned by media:media, with 774 I assumed that the emby user would be able to access everything based on the group membership.

Trying to find the article I read a while ago about getting Emby Server to run as media user but not having any luck... Thought that might be worth a try, all my other plugins use this user and have no problems.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Make sure your services are running as the emby user in the jail. Also stop making emby users in freenas. You need to add a group in the jail with the same gid as media from freenas.

Sent from my Nexus 5X using Tapatalk
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

zirophyz

Dabbler
Joined
Apr 11, 2016
Messages
26
Thanks both of you.

@SweetAndLow - Oops, I had it ass-about thinking I needed to create the users/groups on the host to allow the jail users to get access. The emby jail already had the media group, so I added the jails' emby user to the media group.

@Joshua Parker Ruehlig - Once the jails' emby user had media as a secondary group, it could access the 775 dirs.

I knew this wasn't going to be something big. As I said, networks are my thing and unix admin is not. I really appreciate the help getting this working. I've done a chmod -R on the entire TV directory and am doing a Library Scan in Emby now....
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Just because networks are your thing doesn't mean you can't know about *nix stuff. I don't do networking or *nix stuff but still manage to get by.

Sent from my Nexus 5X using Tapatalk
 
Status
Not open for further replies.
Top