Project

General

Profile

Can only record to default path; have mounted shared network drive but TVHeadend won't record there

Added by David Lowe almost 3 years ago

Version of TVHeadend is 4.2.8-34~g24a2f59e9 (fresh install following https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-stream-digital-tv-with-the-raspberry-pi-tv-hat method)

Running on Raspberry Pi Debian 10 with Raspberry Pi TVHat

Fresh install as above. I can record to the default path

/home/hts

without difficulty

I've followed various online suggestions and added

//192.168.2.16/TVHRecord /home/pi/NASTVrecord cifs guest,uid=1000,gid=1000 0 0

to my /etc/fstab file

but when I change the recording path to

/home/pi/NASTVrecord

then I just get an error (red exclamation mark in the "Details" column of the EPG) after a few seconds.

I suspects it's a permissions related thing. I CAN delete or modify any of the existing files in the mounted share from the pi desktop.

Any suggestions would be very much appreciated.


Replies (8)

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by Dave Pickles almost 3 years ago

Tvheadend runs as user hts, so hts needs to be able to read/write files on your network share.

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by Hiro Protagonist almost 3 years ago

Check your /etc/passwd file. The UID of the user TVH is running as should match the UID you're using in your fstab entry.

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by David Lowe almost 3 years ago

Thank you for your replies...

Still not quite there, and have possibly gone backwards as I now get an error message from the pi desktop

mount: /home/pi/NASTVrecord: operation permitted for root only.

whenever I try and view my shared drive!

The relevant line of of /etc/passwd file is

hts:x:115:124::/home/hts:/bin/bash

so I have changed my /etc/fstab entry to

//192.168.2.16/TVHRecord /home/pi/NASTVrecord cifs guest,uid=115,gid=124 0 0

The Samba share on Open Media Vault is set up for "Guests allowed".

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by Dave Pickles almost 3 years ago

Reset the 'uid' value in your fstab entry to 1000, and set the 'gid' value to the number for the 'hts' entry in /etc/group. Then change the permissions on your NAS recording directory to allow group 'hts' to write there -

chown -R pi:hts /home/pi/NASTVrecord
chmod -R 775 /home/pi/NASTVrecord

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by G E almost 3 years ago

Hello

I created an account because I have the exact same issue.
I can record to the RPI's local path (moved it from /home/hts to /home/pi/NASTVrecord) but not to my Synology NAS (/nas/Downloads/NASTVrecord).
I even tried to keep those folder names that were chosen above to eliminate the possibility of having permission issues.
Unfortunately I can't get it to send the recordings to my NAS.

My fstab input is:

//192.168.1.131/nas/Downloads/NASTVrecord        /home/pi/NASTVrecord cifs guest,uid=1000,gid=124 0 0 (my hts is 124 too according to  /etc/group)

When I run mount -a I don't get any errors which hopefully means that the mount point works.

In my Synology folder share settings I have granted rw permissions to ''guest'' and I also created another user ''hts'' with rw permissions.
What am I possibly doing wrong?

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by Chris Scherer almost 3 years ago

Try setfacl to set the permission for user hts.

Example:
setfacl -R -m u:hts:rxw /home/pi

and same on your NAS via ssh.

Take care, on your NAS beginns the path with /volumeX/......

with setfacl you will ADD the user hts to the Access Control Lists.
You will find some examples on the internet.

ACL doesn't touch the chmod-mask.
Hint: Synology use the same proceder for the User-Rights in the DiskStations.

AND:

tvheadend uses allways the user "hts". Your mounting point is set for user "guest". RPI take a call to "guest"... "guest" answers with: Yeas... here i'am! Who are you? ... Answer form RPI: I'am "hts"... the end of the call ;-( "guest" talks only whith "guest"

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by G E almost 3 years ago

Thanks for your reply.
It looks way more complicated than what I'm used to though.

RE: Can only record to default path; have mounted shared network drive but TVHeadend won't record there - Added by G E almost 3 years ago

Alright I've made some progress.
Nas is now mounted on /home/pi/NASTVrecord as within TVheadend GUI I can see on top a massive space in TB which is clearly my NAS.

Fo certain, the problem is with permissions now. When I move files from the NAS side to NASTVrecord folder I can then ''ls'' and see them on the Pi side.
It's probably the other way around that is not permitted - the Pi to write on that folder.

    (1-8/8)