Jump to content

Accessing external USB drive


johnsonb

Recommended Posts

johnsonb

Hello. I am reasonably new to Linux and brand new to Emby. It installed it fine in Mint-64, the problem I am having is browsing to an external USB drive that has of all the media. I cannot navigate to it when trying to add it as a media library. The only choice I have available is on the boot drive. The USB drive is /dev/sdb1  and putting that in as the library path does not work. It is formatted in NTFS and with file manager it is

/media/bj/System F and I tried that as well.

 

It's driving me nuts and there must be a way to access it.

 

thanks, Bj

 

 

Link to comment
Share on other sites

johnsonb

Well, does not work meant putting /dev/sdb1 in the library path field does not bring up any movies.

 

thanks

Link to comment
Share on other sites

mark-in-dallas

I'm pretty new to Linux as well and far from an expert, but you might try creating a symlink to the USB Drive in your home directory and using that as the library path and see if that will work.

 

The other thing I would look at is ownership and permissions settings for the USB Drive and files on it.  If the Emby account doesn't have permission to access the drive and files that would probably be the reason for not being able to add it to your library.

 

I'm sure mastermind11 will probably be along soon and be able to offer much better assistance than I can though.

Edited by mark-in-dallas
Link to comment
Share on other sites

johnsonb

Hi. Earlier I started down the road of permissions and USB mounting tools (like pmount) until I clued in that this system has r/w access. I can look at those directories with File Manager and manipulate the drive as I would any other. I am so close to getting this working.

 

thanks for the reply.

Link to comment
Share on other sites

mark-in-dallas

You can look at those directories in the File Manager, but that doesn't mean that the Emby user can.  If you are using the Nemo File Manager, open it and right click inside, then select Open as Root, then navigate to the USB Drive and right click on it, then select permissions and make sure that the Emby user or group has access to it and the directories on it.

Link to comment
Share on other sites

johnsonb

Hi. Well, if I look at the permissions as root, in the Group drop down I can see Emby. If I select it, it automatically changes back to Bj.

 

thanks

Link to comment
Share on other sites

mark-in-dallas

Okay, so if I understand, the Drive or Directories are assigned to the Bj group, but the Emby user is not part of the Bj group and would not be able to access files assigned to that user or group.  Try going into the terminal and switching to the Emby user, then seeing if you can view or access the Drive or directories, or try to touch something in one of the directories while logged in as the Emby user.  If you are unable to I am pretty sure that is the cause of your problems.

 

Emby has to have access to the Drive and directories for the app to be able to see and access what is on them.

 

I could be wrong, but think that the easiest way to resolve the issue might be to add yourself to the Emby usergroup, change ownership of the Drive to Bj, and permissions of the directories to emby.

 

My media is mounted at /mnt/4TB-Drive and if I go into the terminal and do an ls-l /mnt/4TB-Drive this is the output.  I am able to access all directories from Emby, but the only one that needs write permissions is the TV directory.

root@Media-PC:~# ls -l /mnt/4TB-Drive
total 660
drwxrwxrwx  2 mark root   4096 Mar 25 12:02 Mashups
drwxrwxrwx  4 mark root  12288 Apr 22 21:39 Movies
drwxrwxrwx  2 mark root 651264 Apr 25 02:14 Music
drwxr-xr-x  9 root root   4096 Apr 28 15:00 timeshift
drwxrwxrwx 11 mark emby   4096 Apr 20 06:56 TV

Again, I am a noob when it comes to Linux, but created a bunch of problems for myself when I first installed it and learned a good bit while I was trying to rectify the issues I had, and every bit of the credit for helping me goes to mastermind11.

 

You may find some useful information in either of these threads as well:

 

https://emby.media/community/index.php?/topic/32218-file-permissions-guide-for-new-linux-users/

 

https://emby.media/community/index.php?/topic/83565-linux-noob-help-with-setting-up-nas-access/

Edited by mark-in-dallas
Link to comment
Share on other sites

johnsonb

That is great info, thanks. Getting late and fog-brained, I'll look at this a tomorrow. My first kick at the can is that emby does not have its login/user.

 

I appreciate your time.

 

 

Link to comment
Share on other sites

johnsonb

Well I saw something on another site and that was to go into Disks and mount the USB drive at system start. I can read all the files into Emby now, however, then will not play. If I select a movie after 30 seconds I get 'file not playable'

 

closer I think.

 

 

Link to comment
Share on other sites

mark-in-dallas

It is late and I'm getting a bit foggy brained myself and am about to crash for the night, but quickly, you'll not find the Emby acount in the users and groups app, but you can go into the terminal and switch to the emby account then type in "id" without the quotation marks to get the userid, group and group id, from there you can use chown or cgroup to change the ownership or group that a file or directory is assigned to.

 

I think if you mount a drive in Disks it only remains mounted until a reboot.  I am not positive about this, but seem to kind of recall attempting that myself and choosing against it for that reason.  It may have also been that mounting a Drive in the terminal using the mount command was what didn't stick after a reboot though.  I definitely recall that the Chrome Remote Desktop app completely broke any ability for me to mount or view anything on a USB Drive though, and uninstalling it fixed the issue.

Edited by mark-in-dallas
Link to comment
Share on other sites

mastrmind11

yeah, you have to explicitly mount the drive in your filesystem, you can't use the file manager, it will create the mount in userspace where the emby user won't be able to access it easily.  here, follow this through https://linuxize.com/post/how-to-mount-and-unmount-file-systems-in-linux/

 

then make sure whoever needs r/w access to the drive belongs to the group that owns the drive (which can be found by navigating to the mount point _after_ it's mounted and typing ls -l).  If you get stuck on the permission stuff come back, but mounting should be pretty simple if you just follow the tutorial I linked above.

Link to comment
Share on other sites

mark-in-dallas

Just wanted to note that that everything I'd said about mounts not persisting after reboots was incorrect.  It was getting late and I'd had several beers and I guess my mind was a bit scrambled when I made that post.  It was actually Binds that I could not get to persist across reboots.  But, I do recall not being able to mount anything in Disks or in the terminal with the mount command while Chrome Remote Desktop was installed.

Link to comment
Share on other sites

johnsonb

Thanks to everyone for their help. It is working fine with the mapping from the disk utility. Likely not the most elegant however it works.

 

thanks guys.

 

Link to comment
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...