TVHeadend - Recording permission issue

  • Hi there.


    I am a complete novice to Docker but have watched loads of Docker/Portainer videos and thinking I am sort of getting it now and have managed to set up TVHeadend on OMV system.


    Everything seems to be working fine except for being actually able to record anything.


    Here is my Portainer Stack:




    I then went into TVHeadend and changed the recording pather to:


    /srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare/Video/recordings


    When I try and record anything, I get the message:

    Code
    the directory '/srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare/Video/recordings' is not accessible


    I assume that this is a permission issue but am not really sure.


    Any advice would be much appreciated.

    • Offizieller Beitrag

    You may have some docker user and volume issues. Maybe this will help you.

  • I then went into TVHeadend and changed the recording pather to:


    /srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare/Video/recordings

    You have not been watching videos long enough :) The path inside the container is /recordings.


    When mapping something to docker left side: host, right side: container

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thanks very much.


    First the good news - as Zoki has pointed out, changing the recording folder (in TVH) to /recordings and it changed from the directory not being found to the directory not have access rights - so I am going in the right direction.


    The bad news - my TVHeadend system has gone potty. Even though the recording folder cannot be accessed, the system is showing that it is trying to write to the folder (which has never happened before - you usually just get an exclamation mark). Also, I cannot cancel the recording and and it is throwing an error up:

    Code
    mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new

    This has put me in a really difficult position as I don't whether the error is with OMV, Docker or TVH, now.


    Any ideas on what I might try?

  • give me the output of

    ls- la /srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare

    ls -la /srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare/Video

    ls -la /srv/dev-disk-by-uuid-a8eb1884-ed5e-45f6-ae9f-4f81f35e363c/x86ServerShare/Video/recordings


    I bet the PGID should be 100 not 1000 in the docker-compose


    And you should never use /var/lib/docker/volumes/tvheadend_config :/config the volumes insde /var/lib/docker/volumes are named volumes and managed by docker itself. Eigther you use docker managed volumes tvheadend_config:/config (not realtive! pat on the left) or /some/path/outside/var/lib/docker/:/config (not: absolute path on the left)

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thanks for sticking with me on this - Zoki.


    I am going to make this work (and understand it) if it kills me!


    In light of your comments above, I uninstalled Docker and had a look at Chente's guide.


    I do not have a separate SSD for docker, so what I did was create a new directory in root called "docker" and then a configuration inside that called "config".


    I then changed my docker sorage to /docker/ in the addon.


    I then added a user called appuser and checked the the user and grp id = 1001 and 100.


    I then reran docker with the following settings:


    I got the same access denied error:


    I ran the codes that you suggested and I got the following:

    • Offizieller Beitrag

    I do not have a separate SSD for docker, so what I did was create a new directory in root called "docker" and then a configuration inside that called "config".

    This is not a good idea.

    What system does OMV run on? How is your storage system configured?

    • Offizieller Beitrag

    I am running OMV on a 60GB SSD with a 2TB HDD for storage.

    I would install OMV on a USB stick and use the 60GB SSD for docker. Don't forget to install openmediavault-flashmemory.

    • Offizieller Beitrag

    The last yml you posted still shows a PGID of 1000. As Zoki said earlier, it almost certainly should be 100. Two zeros, not three.

  • You folders ar owned by user Alex and group users.

    So user Alex can wr and anyone in the group users can rw, but not the user appuser with group (1000 probably Alex)

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • This is getting very frustrating, now.


    I have completely wiped my entire system and completely followed chente's guide.


    My new stack is as follows:



    I have checked on the "media" folder permissions and get the following:


    Code
    root@x86Server:/srv/dev-disk-by-uuid-39cd1bac-1f3e-473c-8743-aa37013eeacb# ls -la
    total 52
    drwxr-xr-x   6 root root   4096 Feb  6 21:38 .
    drwxr-xr-x   7 root root   4096 Feb  6 17:51 ..
    -rw-------   1 root root   6144 Feb  6 17:51 aquota.group
    -rw-------   1 root root   7168 Feb  6 17:51 aquota.user
    drwxrwx---   3 root users  4096 Feb  6 18:55 config
    drwx--x---  13 root root   4096 Feb  6 21:48 docker
    drwx------   2 root root  16384 Feb  6 17:36 lost+found
    drwx--s---+  2 root users  4096 Feb  6 21:51 media

    Again, I have received the following error:


    Code
    2022-02-06 21:56:23.990 dvr: entry dcc00b90c4e7a4c65a20a3bfe0398cd0 "New: Celebrity Hunted" on "Channel 4" starting at 2022-02-06 20:59:30, with broadcast id "", scheduled for recording by "192.168.1.41"
    2022-02-06 21:56:23.990 dvr: "New: Celebrity Hunted" on "Channel 4" recorder starting
    2022-02-06 21:56:23.991 subscription: 0003: "DVR: New: Celebrity Hunted" subscribing on channel "Channel 4", weight: 500, adapter: "SAT>IP DVB-S Tuner #4 (192.168.1.42@UDP)", network: "Astra", mux: "10714.25H", provider: "BSkyB", service: "Channel 4", profile="pass", username=""
    2022-02-06 21:56:24.077 dvr: Unable to create dir "/recordings/New_ Celebrity Hunted": Permission denied
    2022-02-06 21:56:24.077 dvr: Recording error: "New: Celebrity Hunted": Unable to create file
    2022-02-06 21:57:18.791 mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new
    2022-02-06 21:57:28.793 mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new
    2022-02-06 21:57:38.811 mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new
    2022-02-06 21:57:48.799 mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new
    2022-02-06 21:57:58.777 mpegts: too much queued table input data (over 2MB) for SAT>IP DVB-S Tuner, discarding new
    • Offizieller Beitrag

    Again, I have received the following error:

    I haven't used tvheadend in years but I remember it was hard to set up. Check the linuxserver instructions well. https://hub.docker.com/r/linuxserver/tvheadend

    You must also ensure that the docker user is included in the group that provides access to the video recording card.

  • I am using a Sat IP box for my recordings and it seems that, to get that working, all I needed to add was


    Code
    network_mode: host

    to the stack.


    It is really bizarre - I have used TVHeadend for years without any issue.


    Millions of people appear to have used the Docker version, so I must be missing something really obvious.

    • Offizieller Beitrag

    I am using a Sat IP box for my recordings and it seems that, to get that working, all I needed to add was



    Code network_mode: host

    to the stack.

    So it works for you now?

    • Offizieller Beitrag

    Nobody has mentioned your permission settings that you posted earlier. root and users is okay because every user you create in the GUI is automatically made a part of the group users. I think all you really need to do is change the permissions in the group part of your permissions to rwx instead of no permissions at all, as your code shows for the media and config folders.

  • Thanks Agricola - I really thought that that was going so crack the case but:


    I changed permissions of the media folder as follows:



    I then had another go at recording and got this


    Code
    2022-02-07 10:17:45.450 dvr: entry b57b204051dda5b71bdd0e09d1df2821 "Frasier" on "Channel 4" starting at 2022-02-07 09:59:30, with broadcast id "", scheduled for recording by "192.168.1.41"
    2022-02-07 10:17:45.450 dvr: "Frasier" on "Channel 4" recorder starting
    2022-02-07 10:17:45.451 subscription: 0003: "DVR: Frasier" subscribing on channel "Channel 4", weight: 500, adapter: "SAT>IP DVB-S Tuner #4 (192.168.1.42@UDP)", network: "Astra", mux: "10714.25H", provider: "BSkyB", service: "Channel 4", profile="pass", username=""
    2022-02-07 10:17:45.498 dvr: Unable to create dir "/recordings/Frasier": Permission denied
    2022-02-07 10:17:45.498 dvr: Recording error: "Frasier": Unable to create file


    I just don't understand - if everyone is able to read and write to the media directory, why can Docker/TVHeadend not?

  • Success at last!


    I removed the DATA disk from the symlink addon and just used its full path name instead.


    Working perfectly now.


    I cannot work out why this makes a difference but at least it works.


    Thank you sooooo much, everyone - really appreciate your efforts and I have learnt a lot along the way.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!