[Solved - thx SgtAwesomesauce] - Noob question on mounting

Hello all.

I’ve installed Jellyfin server on my 24.04 Mate computer, to serve content from another computer. I have samba shares mounted that contain the video I am looking to serve. Jellyfin doesn’t “play well” with samba shares. Is there a way to mount these to /mnt or /media? I’ve searched online but it seems everything is from 18.04 and earlier.

Pardon the elementary question.

WWED

1 Like

Linux allows you to mount many network filesystems, just like you would in Linux. You’d need to install the cifs-utils package, I think it’s called, on Ubuntu-based distros.

From there, you’ll need to edit /etc/fstab and add a line for the filesystem mount:

//192.168.1.36/videos /media/videos cifs defaults,_netdev,auto,user,noexec,uid=YOUR_UID,gid=YOUR_GID 0 0

You’ll need to fill in YOUR_UID and YOUR_GID with the user ID and group ID of the user running jellyfin.

Before you mount the filesystem though, you need to create the directory it’s mounting to:

sudo mkdir -pv /media/videos

Now you should be good to go. Mount the filesystem with sudo mount -a.

4 Likes

I was almost there and this pieced together the few things I was missing and made it super easy, thank you.

5 Likes

Happy to help, my dude; that’s what we’re here for!

1 Like

Is there a way to mount at boot? I get permission denied unless I run sudo mount -a after every restart

The _netdev,auto flags should tell it to auto-mount at boot, but wait for the network to be ready first.

Can you paste the exact error you’re getting, and what you’re doing when you get the error?

Just clicking on it? in the gui after noticing jellyfin couldnt gather the content in an attempt to mount manually.

image

any dmesg / joutnalctl error?

the system should (Should) mount it automatically, during boot, after networking all running

iirc, mate has a logviwer in the gui somewhere if you rather not scroll thu lots of console text

So that is almost guaranteed an error because the owner of the the mount point in /etc/fstab is not your user.

That said, it should be an auto mount. Could you reboot, then share the output of mount? Before you do anything else on the machine?

Also, if you could do ls -al on the directory you chose to mount the smb share to, that would be very helpful.

1 Like

My fstab line:

#mount HTPC Drive
//192.168.1.36/video /media/smbvideo cifs defaults,_netdev,auto,user=wstorage,password=wstoragep,noexec,uid=1000,gid=1000 0 0

when trying to mount via terminal

wwed@wwed-Z590-AORUS-MASTER:~$ mount /media/smbvideo
mount.cifs: permission denied

above works as superuser

below per request (if I correctly provided what you asked for), directory in question is smbvideo:

      
wwed@wwed-Z590-AORUS-MASTER:/media$ ls -al
total 32
drwxr-xr-x   7 root root 4096 Jun 14 15:26 .
drwxr-xr-x  24 root root 4096 May  1 09:52 ..
drwxr-xr-x   2 wwed wwed 4096 May 28  2023 jellyfin
drwxr-x---+  4 root root 4096 Jun 16 11:58 wwed
drwxr-x---+  2 root root 4096 Jun 16 11:44 root
drwxr-xr-x   2 wwed wwed 8192 Apr 28 12:34 smbvideo
drwxr-xr-x   2 wwed wwed 4096 May 29  2023 video

wwed@wwed-Z590-AORUS-MASTER:~$ id wwed
uid=1000(wwed) gid=1000(wwed) groups=1000(wwed),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),121(lpadmin),137(lxd),138(sambashare),141(libvirt),145(jellyfin),995(ollama)

premount:
nothing referenced in relation to the smbshare

once mounted:

//192.168.1.36/video on /media/smbvideo type cifs (rw,noexec,relatime,vers=3.1.1,cache=strict,username=wstorage,uid=1000,noforceuid,gid=1000,noforcegid,addr=192.168.1.36,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1,_netdev)

Got no idea, but wouldn’t uid=1000 mean the default user, wwed, instead of the passed user wstorage (which might be 1001 or something?)

Edit: oh, that is the remote user.