Jump to content

Issues in Linux setup


eversmannx

Recommended Posts

eversmannx

Hi All,

 

I am attempting to setup Emby on Ubuntu 18.04 and I have a couple of issues I am looking for help. I have all my media in a old NAS (which doesn't support apps like Emby on it), so I am running Ubuntu on a seperate laptop - all connected with ethernet cables and my broadband is 300mbps.

 

  • I tried many times, but Emby server on Ubuntu never indexed my full library. My library is not huge - I have about 100 movies, and 10 TV shows. After a few fresh attempts I managed to get the TV shows done, but then when I add Movies, it just doesn't do the full job. and I Uninstalled the server and all packages including metadata folders using a package uninstaller, but just never been able to index everything which is really frustrating.
  • When I try this on Windows 7 on the same laptop, it works like a charm, and takes much less time.
  • The main reason I am trying to stick to Linux is because, with Win 7 I feel the laptop is boiling - and it's a setup I only use for this server, so I can't see any other heavy processes running, yet it's always really hot and it's worrying to keep the laptop like that under my TV unit. Ubuntu on the other hand was just fine, and I had Emby server running for a whole day - I don't think it ever got as hot as it did with Win7.
  • My 2nd issue is to be able to delete files from the interface (web client or my 3x kodi setups with emby add on). With windows 7, my file locations are simply mapped as \\MYBOOKLIVE\MOVIES\xx, in Ubuntu, I didn't want user log in's to be a problem, so allowed anonymous access and file locations would refer as smb://mybooklive/movies/xx - although I can read/write within the Ubuntu explorer, I think I am only getting read only access from Emby server. Maybe this a question on how to setup network folders in Linux to use with Emby.

 

Any help would be much appreciated.

 

Many Thanks

 

Link to post
Share on other sites
sargenthp

Sounds like a permission issue to me. Emby runs under the emby user. Make sure that user has the rights.

 

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
eversmannx

Sounds like a permission issue to me. Emby runs under the emby user. Make sure that user has the rights.

 

 

Sent from my PH-1 using Tapatalk

 

How do you mean "emby user"?

 

the user def has right and able to read the media locations. 

Link to post
Share on other sites
sargenthp

Emby runs under the user 'emby'. At the console you can switch to the user and test the permissions by executing... sudo -u emby bash

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
sector327

How do you mean "emby user"?

 

the user def has right and able to read the media locations. 

 

been a while since I touched a deb based linux but w/ the RH variants, you can look in /etc/password and see all the users. 

Edited by sector327
Link to post
Share on other sites
eversmannx

Thanks for the replies. But I am not as proficient in Linux to check these. I'd appreciate if I can get a bit more specific advice. I've attached screenshots and notes along with them.

 

https://imgur.com/a/ibok31y

 

  • If the problem is the way is how I am referring to the location in emby server setup, please guide on what is the best way (if user login details have to built into it etc)
  • How do I test the "emby" user credentials in this setup (i.e. I don't know how to navigate to the network location in my screenshot to check sudo -u emby bash etc)

Many Thanks

Link to post
Share on other sites
sargenthp

I would be interested in seeing the TV shows folder rights. The last screen shot shows that the user eversmannx has full rights, but groups and others have zero rights... rwx --- ---

 

So do this once...

sudo -u emby bash

cd /run/user/1000/gvfs/smb-share:server=mybooklive,share=movies/_MOVIES/__English

ls -l

exit

 

See if will let you get this far to get into the folder and list the folders as the user emby.

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
sargenthp

Now that I think about it. You are getting the file names but just not getting the metadata such as movie art, correct? When you set up the Movies folder, did you set it up as a Movie type and have the Movie metadata downloaders selected?

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
eversmannx

Yes, That's right. titles come through and Yes, setup as "Movie" type, and metadata downloaders selected. I tried changing the settings to save artwork etc save to same folder, but not sure if that had any major differences. 

Like I said, some of the movies pick up the full metadata, but not all. Any reason it took so long compared to Windows setup?

Link to post
Share on other sites
eversmannx

I would be interested in seeing the TV shows folder rights. The last screen shot shows that the user eversmannx has full rights, but groups and others have zero rights... rwx --- ---

 

So do this once...

sudo -u emby bash

cd /run/user/1000/gvfs/smb-share:server=mybooklive,share=movies/_MOVIES/__English

ls -l

exit

 

See if will let you get this far to get into the folder and list the folders as the user emby.

 

Sent from my PH-1 using Tapatalk

 

 

eversmannx@ThinkPad-T410:~$ sudo -u emby bash

[sudo] password for eversmannx:

emby@ThinkPad-T410:~$ cd /run/user/1000/gvfs/smb-share:server=mybooklive,share=movies/_MOVIES/__English

bash: cd: /run/user/1000/gvfs/smb-share:server=mybooklive,share=movies/_MOVIES/__English: Permission denied

emby@ThinkPad-T410:~$

 

No, permission denied.

Link to post
Share on other sites
eversmannx

after a lot of research/testing, I managed to mount the movies share like this:

 

sudo mount -t cifs //192.168.0.22/Movies /nas/movies -o sec=ntlm,vers=1.0

 

and after that, it literally only took a couple of minutes for emby to index the files and artwork (from /nas/movies). Amazing!

 

@@mastrmind11 now, I need to figure out the correct way to put these into /etc/fstab - if anybody can guide on this next step, that'll be of great help (I'm trying a few syntax's but not much luck so far). 

Link to post
Share on other sites
mastrmind11

after a lot of research/testing, I managed to mount the movies share like this:

 

sudo mount -t cifs //192.168.0.22/Movies /nas/movies -o sec=ntlm,vers=1.0

 

and after that, it literally only took a couple of minutes for emby to index the files and artwork (from /nas/movies). Amazing!

 

@@mastrmind11 now, I need to figure out the correct way to put these into /etc/fstab - if anybody can guide on this next step, that'll be of great help (I'm trying a few syntax's but not much luck so far). 

https://wiki.ubuntu.com/MountWindowsSharesPermanently

 

old article but cifs hasn't changed much over the past decade  :lol:

Edited by mastrmind11
Link to post
Share on other sites
eversmannx

Thanks. After messing about with some more syntax (from that reference), this did the trick.

 

//192.168.0.22/Movies /nas/movies  cifs  guest,iocharset=utf8,sec=ntlm,vers=1.0  0  0

 

Still having issues deleting media from the interface - Adding username/password to this line causes errors (both direct and through credentials file) - need to play around a bit more.  

Link to post
Share on other sites
mastrmind11

Thanks. After messing about with some more syntax (from that reference), this did the trick.

 

//192.168.0.22/Movies /nas/movies  cifs  guest,iocharset=utf8,sec=ntlm,vers=1.0  0  0

 

Still having issues deleting media from the interface - Adding username/password to this line causes errors (both direct and through credentials file) - need to play around a bit more.  

if your NAS supports NFS I'd recommend sharing that way.  cifs/smb is garbage.

  • Like 1
Link to post
Share on other sites
sargenthp

I would recommend installing and using autofs, instead of mapping a network drive in fstab.

 

Sent from my PH-1 using Tapatalk

  • Like 1
Link to post
Share on other sites
sector327

I would recommend installing and using autofs, instead of mapping a network drive in fstab.

Sent from my PH-1 using Tapatalk

No doubt. Autofs works great for this.

 

How interesting to see someone using cifs. I thought it was replaced by smb (which is known for speed & security issues). Just a really old protocol to be still using. Not criticising or anything. Just something I rarely ever see anymore.

Edited by sector327
Link to post
Share on other sites
eversmannx

Thanks guys. I'll look into autofs

 

I didn't know if cifs was old or if there were newer ones like nfs :-) after trying so many guides, and fiddling with settings, that was the only thing i managed to get it to work - my NAS is old (WD MybookLive bought in 2012), but it does support NFS for sure (when I look up from Kodi directly, this option is given). 

  • Like 1
Link to post
Share on other sites
sargenthp

Cifs is not old. It is the standardized protocol for sharing Windows type shares. Using NFS is usually preferred for UNIX/Linux, so if you have that option I would say that would be the best bet.

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
eversmannx

Thanks,

 

I've read a few guides on autofs, but not much luck setting it up correctly so far. Any chance someone can provide the syntax for NFS (and AUTOFS). My working setup as below:

 

Manual mount:

sudo mount -t cifs //192.168.0.22/Movies /nas/movies -o sec=ntlm,vers=1.0

 

fstab:

//192.168.0.22/Movies /nas/movies  cifs  guest,iocharset=utf8,sec=ntlm,vers=1.0  0  0

Link to post
Share on other sites
sargenthp

With your CIFS mount command I am kinda surprised it works since you have vers=1. SMB1 has security issues. Windows 10 is now SMB3.0.

 

** Commands for NFS mount **

You need the nfs client installed...

$ apt-get install nfs-utils

 

See what exports are shared...

$ showmount -e 192.168.0.22

 

This should work for mounting...

$ sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/export_path /nas/movies

 

 

** Autofs Setup **

Edit /etc/auto.master and add in the line...

/nas /etc/auto.nas

 

Create the file /etc/auto.nas and add in the line...

movies -fstype=nfs,rw,soft,intr 192.168.0.22:/export_path

 

Start and enable the autofs service.

$ sudo systemctl enable autofs

$ sudo systemctl start autofs

 

See if you can get to the mount under /nas/movies

 

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
mastrmind11

For NFS fstab, if you ever get it working:

10.0.1.151:/storage/tv /storage/tv nfs rsize=8192,wsize=8192,timeo=14,intr

Keep in mind the uid/gid access has to match whoever you are on the client (ie, emby's uid needs to exist on your NAS in a group that has r/w access to the share)

Link to post
Share on other sites
eversmannx

Sorry, I've been away and didn't get a chance to try your instructions till now.

 

I am unable to get passed the first step...

 

eversmannx@ThinkPad-T410:~$ showmount -e 192.168.0.22
Export list for 192.168.0.22:
/nfs *
eversmannx@ThinkPad-T410:~$

 

 

I tried a few variations, but not sure how to use this (nfs *) in the next step.

sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/export_path /nas/movies

 

Just FYI:

When I try to access the same NAS through Kodi and nfs for installing add-ons, the path shown in the bottom is nfs://192.168.0.22/nfs/Movies etc - i tried similar path in the above syntax for "export_path" but no luck

 

My working /etc/fstab currently again is:

//192.168.0.22/Movies /nas/movies  cifs  guest,iocharset=utf8,sec=ntlm,vers=1.0  0  0
//192.168.0.22/TV_SHOWS /nas/tv  cifs  guest,iocharset=utf8,sec=ntlm,vers=1.0  0  0

 

although it shows root access, i am not able to delete things from Emby interface.

eversmannx@ThinkPad-T410:/nas/tv/_TV/TV_SHOWS/South Park/Season 09$ ls -l
total 1999552
-rwxr-xr-x 1 root root       771 Jun  3 15:39  season.nfo
-rwxr-xr-x 1 root root 154148864 Aug 30  2011 'South Park [9.01] Mr. Garrison'\''s Fancy New Vagina.avi'
-rwxr-xr-x 1 root root     26055 May 26 01:15 'South Park [9.01] Mr. Garrison'\''s Fancy New Vagina.en.srt'
-rwxr-xr-x 1 root root      1762 May 28 12:17 'South Park [9.01] Mr. Garrison'\''s Fancy New Vagina.nfo'
-rwxr-xr-x 1 root root         0 May 26 15:30 'South Park [9.01] Mr. Garrison'\''s Fancy New Vagina-thumb.jpg'
-rwxr-xr-x 1 root root 183549952 Aug 30  2011 'South Park [9.02] Die Hippie, Die.avi'

 

 

 

 

 

 

 

 

With your CIFS mount command I am kinda surprised it works since you have vers=1. SMB1 has security issues. Windows 10 is now SMB3.0.

** Commands for NFS mount **
You need the nfs client installed...
$ apt-get install nfs-utils

See what exports are shared...
$ showmount -e 192.168.0.22

This should work for mounting...
$ sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/export_path /nas/movies


** Autofs Setup **
Edit /etc/auto.master and add in the line...
/nas /etc/auto.nas

Create the file /etc/auto.nas and add in the line...
movies -fstype=nfs,rw,soft,intr 192.168.0.22:/export_path

Start and enable the autofs service.
$ sudo systemctl enable autofs
$ sudo systemctl start autofs

See if you can get to the mount under /nas/movies


Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
sargenthp

Ok. So your exporting "/nas" to all systems (*).

 

See if this works...

sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/nas/movies /nas/movies

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites
eversmannx

no luck :-(

 

eversmannx@ThinkPad-T410:~$ sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/nas/movies /nas/movies
mount.nfs: Failed to resolve server //192.168.0.22: Name or service not known
eversmannx@ThinkPad-T410:~$

 

Link to post
Share on other sites
sargenthp

Also remember Linux is case sensitive. So if your folder is named Movies instead of movies it will fail.

 

So the command might be...

 

sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/nas/Movies /nas/movies

 

Or

 

sudo mount -t nfs -o rw,soft,intr //192.168.0.22:/nas/Movies /nas/Movies

 

Sent from my PH-1 using Tapatalk

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...