Wrong permissions for tvheadend.
Enviorment:
Raspberry Pi 3B, Alpine linux version 3.9.5 (alpine-rpi-3.9.5 200123) in diskless mode. An older version of alpine was needed in order to use the TV-specific hardware (Raspberry Pi TV-Hat).
Issues:
-
According to its APKBUILD, the package tvheadend installs config files in
/etc/tvheadend
. Immediately after installation this directory belongs totvheadend:tvheadend
, even iftvheadend
group is never created. -
According to
/etc/init.d/tvheadend
, the package tvheadend-openrc runs the daemon by using the usertvheadend:video
. Accordingly after the first run of the software the contents of/etc/tvheadend
belong totvheadend:video
. -
After the installation and configuration, and after a reboot of the system the directory
/etc/tvheadend
belongs toroot:root
, while its contents belong totvheadend:video
. This causes the software to malfunction with/var/log/tvheadend/tvheadend.log
showing:
START: configuration path /etc/tvheadend is not r/w for UID:101 GID:27 [e=Permission denied], settings will not be saved
I am not sure if points [1] and [3] are connected. In any case, I think /etc/tvheadend
should belong to tvheadend:video
by default to be consistent with point [2].
Regarding point [3], the problem could be fixed by changing ownership to /etc/tvheadend
and by performing an lbu ci -d
. I do not understand why the directory belongs to root:root
after first reboot even if all configuration is correctly saved by lbu ci -d
.