Project

General

Profile

Mounting NFS for Recorded TV Path

Added by Spencer Caplin about 11 years ago

Hi

Hoping someone can help with the mounting of NFS share to directly save recorded TV too. I can mount the share fine but I have some permissions issues with the mount being root so it won't save the recording I think. If I change to a local folder all works fine. What I want is to in tvheadend gui point recorded tv patch at /tv/rectv.

So here's my setup

TVheadend Server (192.168.1.94) - Ubuntu (Server) 12.04.3 LTS (GNU/Linux 3.5.0-43-generic i686) - TVheadend Build: 3.3.525~g8e08c9d~precise

NFS Server (192.168.1.250) - Open Media Vault (0.5.19) - Linux - 2.6.32-5-amd64

On the NFS Server I have this in my export file

/export/RecTV 192.168.1.0/24(rw,subtree_check,no_root_squash,insecure)

So on my tvheadend server I'm mounting the nfs share using fstab, so in my fstab I have this

192.168.1.250:/export/RecTV /tv/rectv nfs user,rsize=8192,wsize=8192,timeo=14,intr

So as I said this all mounts fine and I can manually save files in the folder and they show on the nfs server but this is using sudo/root.

total 8
drwxrwsrwx+ 2 root users 4096 Nov 10 17:26 rectv
drwxr-xr-x  2 hts  hts   4096 Nov 10 17:11 timeshift

So I think the issue is with recorded tv it wants the owner and group of the folder to be hts:hts ?

So my question is how do I mount this as that user ? or am I doing this wrong and should be going another way around it ? any help/pointers/solutions would be greatly appreciated.

thanks

hawkcapl


Replies (7)

RE: Mounting NFS for Recorded TV Path - Added by Prof Yaffle about 11 years ago

Ignoring the direct question for the moment - it looks like you have supplementary permissions in play, including the setUID bit (the rws vs rwx) and further ACL (the +) at the end. Are these deliberate? What are these doing to over-ride the other=rwx permission (which should be good enough for either hts:hts or hts:videos to write to this directory).

EDIT

A thought - su to the hts user and go and look at your effective permissions on the NFS mount...

RE: Mounting NFS for Recorded TV Path - Added by Spencer Caplin about 11 years ago

hi

thanks for the quick reply and ideas, sorry Linux knowledge not great that's probably why in this situation. I'm using Web GUI of open media vault to create the NFS share and export file.

So on the permissions not deliberate just where I've ended up at now so happy to change them. As I mentioned Open media vault has web GUI and I would guess this is coming from there when I setup the folder with r/w for all on the access of the folder.

This is from the nfs server export folder.

drwxrwsrwx+   2 root users 4096 Nov 10 17:26 RecTV

On your thought about hts user I tried to switch to that user but its not accepting the passwords that I know for the system. I installed tvheadend from the Ubuntu Apt Repository so assuming this got created as part of the install ?

thanks

hawkcapl

RE: Mounting NFS for Recorded TV Path - Added by Prof Yaffle about 11 years ago

Try sudo su hts from your Ubuntu box - that way you only need your own password, not that of the hts user.

The command getfacl <target> will list the permissions. It's not something that should be enabled by default, though, ACLs don't just appear unless something turns them on.

I'm not enough of an NFS guru to get my head around the mounting permissions, I'd have to flounder a bit. But let's see if we can at least understand the underlying issue.

As your ordinary user, try posting the output of:

ls -lad rectv

and

getfacl rectv

and then run the same commands after the sudo su hts and see what it all looks like.

RE: Mounting NFS for Recorded TV Path - Added by Spencer Caplin about 11 years ago

Hi

Yep agree with the floundering on NFS, manage to get it working for openelec/raspbmc NFS booting plus also working great for music/videos/pictures with XBMC.

So just struggling with tvheadend recorded tv which is the final piece in my puzzle to retire Windows Media Centre.

Anyway enough wittering here we go with the output from my tvheadend ubunutu box.

spoddy@spodtvheadend:/tv$ ls -lad rectv
drwxrwxrwx+ 2 root users 4096 Nov 10 17:26 rectv
spoddy@spodtvheadend:/tv$ getfacl rectv
# file: rectv
# owner: root
# group: users
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::rwx
default:other::rwx

spoddy@spodtvheadend:/tv$ sudo su hts
hts@spodtvheadend:/tv$ ls -lad rectv
drwxrwxrwx+ 2 root users 4096 Nov 10 17:26 rectv
hts@spodtvheadend:/tv$ getfacl rectv
# file: rectv
# owner: root
# group: users
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::rwx
default:other::rwx

hts@spodtvheadend:/tv$

Thanks again

hawkcapl

RE: Mounting NFS for Recorded TV Path - Added by Prof Yaffle about 11 years ago

Hmmm, from what I understand that looks entirely... normal. No user-specific ACLs overriding anything. Maybe Ive misunderstood the + for some reason.

Anyway, that all suggests that hts does indeed have write permission - you'll get rwx if you're running at hts:users (via the group permission) and you'll get rwx as hts:video (via the other permission). So you should be able to create a file.

What happens if you cd to the directory while su'ed to hts, can you list the contents, can you create a file (touch test or ls -la > test.txt)?

And the NFS drive is mounted, isn't it? We're not just looking at the mount point?

RE: Mounting NFS for Recorded TV Path - Added by Spencer Caplin about 11 years ago

Hi

Ok going to hide in a virtual corner now....helps if the channel/program I'm trying to record actually works and is viewable. The channel I've been testing for some reason tvheadend is failing to tune to them, just found the system log view on TVH web gui :). Now I've picked a channel it can tune to all working great and now have recorded tv showing on the NFS share.

before the above I did test hts account, yep all good with account being able to write to that directory,

spoddy@spodtvheadend:/tv/rectv$ ls -l
total 349272
-rwxrwxrwx  1 hts video 331891727 Nov 11 16:50 BBC-One-HD-Antiques-Road-Trip.mkv
-rwxrwxrwx  1 hts video  25746033 Nov 11 16:52 Channel-5-Mary-Higgins-Clark's-Remember-Me.mkv
-rw-rw-rw-  1 hts hts         100 Nov 11 16:34 test.txt
drwxrwxrwx+ 2 hts hts        4096 Nov 11 16:33 tv

Also gone onto my nfs server and done same thing to check actually writing to the server and all ok

root@spodmaster:/export/RecTV# ls -l
total 349272
-rwxrwxrwx  1 sshd video      331891727 Nov 11 16:50 BBC-One-HD-Antiques-Road-Trip.mkv
-rwxrwxrwx  1 sshd video       25746033 Nov 11 16:52 Channel-5-Mary-Higgins-Clark's-Remember-Me.mkv
-rw-rw-rw-  1 sshd sambashare       100 Nov 11 16:34 test.txt
drwxrwxrwx+ 2 sshd sambashare      4096 Nov 11 16:33 tv
root@spodmaster:/export/RecTV#

Thank you so much for your help at least I'd setup the nfs bit correctly even with my floundering now to work out why TVH failing to tune to all the channels.

thanks again

hawkcapl

RE: Mounting NFS for Recorded TV Path - Added by Prof Yaffle about 11 years ago

No worries... whatever the problem really was, so long as it's fixed then all is well.

Check your muxes are all defined properly and correct for your local transmitter - plenty of posts here about that. Oh, and, of course, that you're trying to tune to a channel that's currently broadcasting (e.g. avoid BBC4 until 19:00). But that's all a story for another day, isn't it...?

Glad you're (mostly) working, anyway!

    (1-7/7)