recording system path error, if changed from default
Added by Michael Bratge over 3 years ago
I use TVHeadend with a raspberryPi 4B with the Rpi TV HAT. I had the same behavior on a rpi3b+ as well before.
It works in general as long as the recording system path is the default: /home/hts/ or a subdirectory.
But this is the internal system memory, not suited for mass data like videos. If I change the recording path away from /home/hts/, the recording does not work.
I set the user rights in the target directory to 777, I added user hts to group pi and vice versa, nothing helps.
(Changing the mount point of the HDD is actually not a solution, because my system always mounts on /media/pi, don't know yet why.)
Can anybody help me to solve this problem?
Replies (12)
RE: recording system path error, if changed from default - Added by Hiro Protagonist over 3 years ago
What do you have "Storage path:" in Configuration/Recording set to?
Can you post the result of 'ls -l' for each part of the path - e.g. if the path is /foo/bar/baz , the post the output of 'ls -l /foo' and ls -l /foo/bar'.
Messing with group pi won't change anything.
Your drive is mounting at /media/pi because you don't have an fstab entry for it.
RE: recording system path error, if changed from default - Added by Michael Bratge over 3 years ago
pi@Medienserver:/media $ ls l -
insgesamt 8
drwxrw-rw-+ 12 pi pi 4096 Apr 6 08:30 pi
pi@Medienserver:/media/pi $ ls -l
insgesamt 40
..
drwxrwxrwx 2 hts hts 4096 Apr 4 11:57 test ;for test on internal memory, fails too
drwxrwxrwx 1 pi pi 4096 Apr 5 20:31 TOSHIBA ; external HDD
..
pi@Medienserver:/media/pi/TOSHIBA $ ls -l
insgesamt 305
..
drwxrwxrwx 1 pi pi 16384 Jan 23 14:35 Video
..
pi@Medienserver:/media/pi/TOSHIBA/Video $ ls -l
insgesamt 12508768
..
drwxrwxrwx 1 pi pi 24576 Apr 5 15:18 TV-Aufnahmen ;my target directory
my fstab has an entry, but something seems to be wrong so that it doesen't work:UUID=083C36F93C36E0FC /home/hts/ ntfs-3g nofail,rw,auto,nls=utf8,gid=hts,uid=hts 0 0
here I am still searching for the solution, but that's another issue.
RE: recording system path error, if changed from default - Added by Hiro Protagonist over 3 years ago
Hiro Protagonist wrote:
What do you have "Storage path:" in Configuration/Recording set to?
Please paste the actual string from your config.
RE: recording system path error, if changed from default - Added by Michael Bratge over 3 years ago
actually I got solved my problem with the fstab, so I can config a running system, the actual Storage Path is
/home/hts/toshiba/Video/TV-Aufnahmen
this works now,
but with the path's
/media/pi/toshiba/Video/TV-Aufnahmen (ext. HDD) and
/media/pi/test (int. memory)
it does not work, though all necessary rights are given.
I can live now with my solution, but I can reproduce the error behavior on 2 devives. Maybe it is interesting in general.
Do you work with a Raspi, an if, can you reproduce the error?
RE: recording system path error, if changed from default - Added by saen acro over 3 years ago
Michael Bratge wrote:
it does not work, though all necessary rights are given.
For with user?
Can you report tvh service user and group?
RE: recording system path error, if changed from default - Added by Michael Bratge over 3 years ago
the directory /home/hts has user hts and group hts
I included user ths to group pi an user pi to group hts.
How to get out tvh service user and group?
RE: recording system path error, if changed from default - Added by saen acro over 3 years ago
Michael Bratge wrote:
the directory /home/hts has user hts and group hts
I included user ths to group pi an user pi to group hts.How to get out tvh service user and group?
in my case
# ps aux | grep tvheadend
hts 13538 0.2 1.0 1191532 20308 ? Ssl apr03 17:45 /usr/bin/tvheadend -f -p /run/tvheadend.pid -u hts -g video
# ls -al /home/hts/.hts/tvheadend/epgdb.v3
-rw------- 1 hts video 10209 apr 7 20:21 /home/hts/.hts/tvheadend/epgdb.v3
RE: recording system path error, if changed from default - Added by Hiro Protagonist over 3 years ago
Michael Bratge wrote:
but with the path's
/media/pi/toshiba/Video/TV-Aufnahmen (ext. HDD) and
/media/pi/test (int. memory)
it does not work, though all necessary rights are given.
/media/pi is drwxrw-rw- not drwxrwxrwx
Also /media/pi/toshiba should be /media/pi/TOSHIBA [case is important].
RE: recording system path error, if changed from default - Added by Michael Bratge over 3 years ago
Hiro Protagonist wrote:
/media/pi is drwxrw-rw- not drwxrwxrwx
are execution rights necessary to write there?
Hiro Protagonist wrote:
Also /media/pi/toshiba should be /media/pi/TOSHIBA [case is important].
I changed my path to lower case, the upper case came from the HDD's default name.
Let's test further till it works with directory /media/pi/test, this is internal memory and so we don't merge ext. HDD problems.
I changed now the rights:
pi@Medienserver:/media $ sudo chmod x pi
pi@Medienserver:/media $ ls -l
insgesamt 8
drwxrwxrwx 11 pi pi 4096 Apr 6 11:48 pi
pi@Medienserver:/media/pi $ ls -l
insgesamt 36
drwxrwxrwx 2 hts hts 4096 Apr 4 11:57 test
and it still does not work.
Do you know the meaning of the "+" at the end of drwxrwxrwx rights of pi?
RE: recording system path error, if changed from default - Added by Hiro Protagonist over 3 years ago
Michael Bratge wrote:
Hiro Protagonist wrote:
/media/pi is drwxrw-rw- not drwxrwxrwx
are execution rights necessary to write there?
Execution rights are necessary to read the directory.
Rule of thumb: always give directories x permission unless you have a specific reason not to.
Hiro Protagonist wrote:
Also /media/pi/toshiba should be /media/pi/TOSHIBA [case is important].
I changed my path to lower case, the upper case came from the HDD's default name.
OK, as long as your path in TVHeadend config exactly matches what ls -l shows.
Let's test further till it works with directory /media/pi/test, this is internal memory and so we don't merge ext. HDD problems.
I changed now the rights:
pi@Medienserver:/media $ sudo chmod x pi
pi@Medienserver:/media $ ls -l
insgesamt 8
drwxrwxrwx 11 pi pi 4096 Apr 6 11:48 pipi@Medienserver:/media/pi $ ls -l
insgesamt 36
drwxrwxrwx 2 hts hts 4096 Apr 4 11:57 testand it still does not work.
Do you know the meaning of the "+" at the end of drwxrwxrwx rights of pi?
See here: https://unix.stackexchange.com/questions/1646/or-mark-after-running-ls-al
This may be related to your problem.
To test that TVH can write to a location, use the hts user, e.g.
sudo su hts touch /media/pi/test/testfile
This should create a 0 byte file called testfile in /media/pi/test/ [you can delete it afterwards]
If that doesn't work, you should get an error message indicating what the problem is. You can also try stepping back to using /media/pi/ and /media/ until you do succeed - that will isolate what part of the path is a problem.
It's important that you are able to create a file using the exact same path you have configured in TVH [ for example, it's not sufficient to cd to /media/pi/test/ and then 'touch testfile', you must touch using the absolute path].
If your test as user hts works, then TVH should work OK.
When you're done testing as hts, you can get back to the original user with 'exit'.
RE: recording system path error, if changed from default - Added by saen acro over 3 years ago
Hiro Protagonist wrote:
Michael Bratge wrote:
Hiro Protagonist wrote:
/media/pi is drwxrw-rw- not drwxrwxrwx
are execution rights necessary to write there?
Execution rights are necessary to read the directory.
Rule of thumb: always give directories x permission unless you have a specific reason not to.Hiro Protagonist wrote:
Also /media/pi/toshiba should be /media/pi/TOSHIBA [case is important].
I changed my path to lower case, the upper case came from the HDD's default name.
OK, as long as your path in TVHeadend config exactly matches what ls -l shows.
Let's test further till it works with directory /media/pi/test, this is internal memory and so we don't merge ext. HDD problems.
I changed now the rights:
pi@Medienserver:/media $ sudo chmod x pi
pi@Medienserver:/media $ ls -l
insgesamt 8
drwxrwxrwx 11 pi pi 4096 Apr 6 11:48 pipi@Medienserver:/media/pi $ ls -l
insgesamt 36
drwxrwxrwx 2 hts hts 4096 Apr 4 11:57 testand it still does not work.
Do you know the meaning of the "+" at the end of drwxrwxrwx rights of pi?
See here: https://unix.stackexchange.com/questions/1646/or-mark-after-running-ls-al
This may be related to your problem.
To test that TVH can write to a location, use the hts user, e.g.
[...]This should create a 0 byte file called testfile in /media/pi/test/ [you can delete it afterwards]
If that doesn't work, you should get an error message indicating what the problem is. You can also try stepping back to using /media/pi/ and /media/ until you do succeed - that will isolate what part of the path is a problem.
It's important that you are able to create a file using the exact same path you have configured in TVH [ for example, it's not sufficient to cd to /media/pi/test/ and then 'touch testfile', you must touch using the absolute path].
If your test as user hts works, then TVH should work OK.
When you're done testing as hts, you can get back to the original user with 'exit'.
I recomend few years ago, same thing to be implemented inside TVH.
It can be a buton to test new location.
RE: recording system path error, if changed from default - Added by Michael Bratge over 3 years ago
Yes, somehow behind the "+" seems to be the problem. I made a new Path /media/test and there everything is ok.
I followed your link, but option -e at command ls is unknown pi@Medienserver:/media $ ls -e
ls: Ungültige Option -- e
So, because it is clear now that it was an individual problem with my configuration and not an overall problem, and I don't need this folder anymore, I deleted it..
.. and I think we can close the thread here.
Thank you once again for the time you took to help me.