Bug #6307
superuser cannot login, browser returns 403 Forbidden
0%
Description
After installing tvheadend in a new version, the first login with the superuser is not possible.
The browser always returns "403 Forbidden"
This occurred with the following versions of tvheadend:
4.3.0~pre+202310010012-0~built202310010043~git51adc0404~ubuntu22.04.1
4.3-2156~g51adc0404~jammy
After a long search and after trying other methods to login, I found the reason.
In a former version of tvheadend the place of the configuration directory of the hts-user has been changed.
Before, it was /home/hts/.hts/tvheadend/
now it is
/home/hts/.config/hts/
Within these changes the file superuser, where the superuser name and password is stored, which has to be provided during installation process,
has landed in a wrong place, where it obviously cannot been found by the installation.
it is now located as /home/hts/superuser,
but it belongs into the same place of the configuration directory as it was, before the config dir has been changed.
So it now belongs here: /home/hts/.config/hts/superuser
Until this error is remedied, it can be easily corrected by just moving the file into the right place with the following terminal command (with root rights):
sudo mv /home/hts/superuser /home/hts/.config/hts/superuser
Close the browser, restart the tvheadend service using the command
sudo service tvheadend restart
open the browser again with the tvheadend login page, now you should be able to login and continue the setup process.
Recommendation:
It would have been helpful, if in this case of a misplaced superuser file the browser does not bring this confusing error message,
but the installation would give a message, that the superuser file has not been found, which is the exact reason for not being able to login.