Project

General

Profile

Just another "403 Forbidden" issue?

Added by Axel Suppantschitsch over 1 year ago

Hi,

I am desperate. I haven't changed anything about my current TVH setup that is using 4.3-2120~g18effa8ad~jammy. I run a setup with satip-axe, which works flawlessly. My Kodi setup works, using the users and credentials for htsp streaming.

However, I cannot access my admin interface anymore. I keep getting those 403 errors after signing in with the "admin" user. I googled for a day now, tried the "-C" parameter, deleted cookies, restarted web browsers, used different web browsers, checked the file system permissions of the "hts" user, etc. But nothing! I keep getting those 403s...

Could you please help me with your ideas and suggestions? Thanks!

Best regards.


Replies (18)

RE: Just another "403 Forbidden" issue? - Added by saen acro over 1 year ago

Do you try with superuser?

RE: Just another "403 Forbidden" issue? - Added by Axel Suppantschitsch over 1 year ago

Thanks for the hint. I just stopped the "tvheadend" service via "systemctl" and started "tvheadend" as "root" from the command line and it worked. I could access the admin interface. There is obviously an issue with the "hts" permissions.

As I use 4.3-2120~g18effa8ad~jammy, I also tried to reinstall the latest ubuntu tvheadend package via "apt reinstall tvheadend". I am still getting 403 errors...

RE: Just another "403 Forbidden" issue? - Added by saen acro over 1 year ago

Wrong

ps aux |grep tvheadend

see command with service use to run it.
stop service

sudo command -C

see permission's of administrator in TVH
ctrl+c

run service again

RE: Just another "403 Forbidden" issue? - Added by Axel Suppantschitsch over 1 year ago

root@xyz:~# ps aux |grep tvheadend
hts        11716  0.6  1.0 1999464 40384 ?       Ssl  May26   7:15 /usr/bin/tvheadend -f -p /run/tvheadend.pid -u hts -g video
root       47675  0.0  0.0   9076  2336 pts/1    S+   10:29   0:00 grep --color=auto tvheadend
root@xyz:~# systemctl stop tvheadend.service
root@xyz:~# sudo /usr/bin/tvheadend -f -p /run/tvheadend.pid -u hts -g video -C
root@xyz:~# ps aux |grep tvheadend
hts        47925  5.4  0.8 1069396 32248 ?       Ssl  10:34   0:00 /usr/bin/tvheadend -f -p /run/tvheadend.pid -u hts -g video -C
root       47979  0.0  0.0   9076  2336 pts/1    R+   10:34   0:00 grep --color=auto tvheadend

Unfortunately, this also leads to a "403 Forbidden" error after logging in as "admin". So, I can't see the permissions of "admin" in TVH.

RE: Just another "403 Forbidden" issue? - Added by saen acro over 1 year ago

With -C you bypass login
then go to your "Admin"account and see it's settings are set OK

RE: Just another "403 Forbidden" issue? - Added by Axel Suppantschitsch over 1 year ago

Sorry, but -C does not work for me. TVH will anyway ask for credentials and end up in a 403.

However, studying the debug options [[https://docs.tvheadend.org/Appendices/command_line_options/#debug-options]] I found a switch that did the trick for me:

--noacl                 Disable all access control checks

After adding "--noacl" I could log in without credentials and without 403 to fix the permissions.

Sean acro: Thanks for your support!

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang over 1 year ago

Did you check the FAQ’s before posting here. All that is explained https://tvheadend.org/projects/tvheadend/wiki/Faq

RE: Just another "403 Forbidden" issue? - Added by Axel Suppantschitsch over 1 year ago

Well, as initially written I googled about a day before posting, but obviously missed that.

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang over 1 year ago

You can nearly be sure that if you experience a problem in TVH someone else has and there’s a solution already out there. A lot of people criticise the documentation but you’ll usually find the answer there.

RE: Just another "403 Forbidden" issue? - Added by joe blow over 1 year ago

"You can nearly be sure that if you experience a problem in TVH someone else has and there’s a solution already out there. A lot of people criticise the documentation but you’ll usually find the answer there."
You need to have a look at the MANY unanswered questions that have been posted on this forum, with people that have problems.
I for one have posted a known BUG issue, with ZERO suggestions on how to solve, by the way the bug was supposedly "fixed" Updated by Jaroslav Kysela over 7 years ago

Status changed from New to Fixed

I believe its fixed in the recent code.

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang over 1 year ago

joe blow wrote:

"You can nearly be sure that if you experience a problem in TVH someone else has and there’s a solution already out there. A lot of people criticise the documentation but you’ll usually find the answer there."
You need to have a look at the MANY unanswered questions that have been posted on this forum, with people that have problems.
I for one have posted a known BUG issue, with ZERO suggestions on how to solve, by the way the bug was supposedly "fixed" Updated by Jaroslav Kysela over 7 years ago

Status changed from New to Fixed

I believe its fixed in the recent code.

Development of TVH ceased a number of years back. Outside of some maintenance commits little or nothing new has been added. As a result interest in the forum has fallen away too.

Most of the reported problems relate to basic lack of knowledge of the workings of TVH which are easily answered with a search. It’s know what to search for is the trick.

RE: Just another "403 Forbidden" issue? - Added by Andrew N 11 months ago

Jonas Lang wrote:

It’s know what to search for is the trick.

Amen brother!

I too have this 403 problem. I've tried all the solutions I can find, including the above. Stopping the service and 'sudo tvheadend -C' does indeed allow me to log in again. I perform all my changes, checking my user account has maximum privileges, log out and restart the service and attempt to login only to be greeted by the 'forbidden' error.

I've checked all my changes have been registered in the 'home' hts dir (time stamps on /var/lib/tvheadend dirs, which appears to be where the configs are and not /home/hts - which doesn't exist). I've cleared cookies, tried different browsers (even used another laptop!) Purged, deleted all files with reference to tvheadend and hts, re-installed and.... same thing.

I reckon that there's something somewhere that's preventing me logging in. hts permissions somewhere was suggested above but I don't know, I'm at a loss. The only option I see left to me is to wipe the SD card completely, reinstall raspbian and start over.

The only thing that springs to mind that I have done that might be a little out of the ordinary is install the tvheadend-dbg package. I'll skip that on the next attempt.

Edit: with the service stopped, and sudo restarted manually, I can log into the dashboard with the user/password I checked. I can see everything is there and okay. Login, kill the process, and restart with systemctl and I am locked out again.

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang 11 months ago

How exactly did you install TVH. What version of RPIOS are you using.

RE: Just another "403 Forbidden" issue? - Added by Andrew N 11 months ago

Jonas Lang wrote:

How exactly did you install TVH. What version of RPIOS are you using.

Using instructions linked on my 'newbie questions' thread; a clean install of latest raspbian (Debian 12 bookworm) then sudo apt-get install tvheadend. Simply itself and was working.

I suspect hts permissions or rw rights somewhere and thought dpkg reconfigure would sort it, but unfortunately not.

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang 11 months ago

Rights and permissions don’t change magically. You may well have unknowingly changed these during some configuration process.

You could spend hours trying to resolve this matter or probably your best course of action would be to start with a fresh install.

I assume you know how to do a complete removal of TVH using the usual commands to ensure you are starting with a blank canvass and no previous configuration artefacts remain.

RE: Just another "403 Forbidden" issue? - Added by Andrew N 11 months ago

Apologies, ignore my use of the passive voice! Yes, undoubtedly I did something to change things. I was trying to get an external disk mounted and writeable, so was looking at permissions etc. primarily on my mount command but I wouldn't swear to not having changed something unaware of a broader consequence.

Point is, I have little idea of what or where to look to resolve - I'm just presented with a 'computer says no' error. I'd hoped reinstalling and/or reconfigure would sort it, but not to be.

No mind, it's easy enough to clean install from scratch. It's always a learning process for me :)

RE: Just another "403 Forbidden" issue? - Added by Jonas Lang 11 months ago

Remember we can only offer a solution on the facts presented here. From a search no doubt you have seen so many posts on the subject of 403 Forbidden. In many cases there is no definitive answer to the problem but many suggestions, some that appear to have worked but the user chooses not to come back here to confirm this.

I am not sure how familiar you are with Linux and its file structures particularly when it comes to file permissions and ownership. One careless use of a command with root privileges can cause havoc system wide.

Generally when you install via the apt package manager most of the background administration is taken care of for you. When you start going off script without the prerequisite skills you run the risk of breaking your system and in most cases the simplest and quickest solution is to remove and reinstall the package rather than trying to repair it.

If you are referring to a previous post either from yourself or another user it does help to include a link. Saves us having to search for it.

Finally if you are attempting to configure your system outside of the basic setup it might make more sense to post here for assistance first so we can point you in the right direction.

You mentioned adding an external drive. Was that via a network share or connecting physically via USB directly to the RPI. In either case the process is quite straightforward as long as you give us the full background.

RE: Just another "403 Forbidden" issue? - Added by Andrew N 11 months ago

I've reinstalled from scratch and everything is, as expected, just fine. It really is simplicity to start over, which I why have no qualms tinkering. Safe in the knowledge that nothing is irretrievable.

I've enough unix knowledge to navigate myself around, understand the basics and make adjustments accordingly - and no doubt enough knowledge to get myself into trouble! Still, that's how one (me at any rate) learns. I've reinstalled enough systems now (android, linux, windows) to know I can always recover a situation. I was once a programmer, and still dabble with scripts - albeit largely ripped off and repurposed but always understood. So I know errors happen, and I now they are triggered by something.

If an error message is insufficiently helpful, where in a former life I'd delve into code to find the reason, then I like to try and work out why it has occured. That helps my understanding of a system. There's a reason this 403 is thrown; the correct data is there so maybe it can't be read due to permissions, or found due to paths. Whatever, main thing is that I have a system up and running again.

Yes, I was trying to mount an external drive, a network share. That's nothing new to me and I appear to have got that sorted. However, on this new installation iteration I might use an attached USB stick as suggested elsewhere.

I've encountered another issue which I'll research a little and then maybe raise on a new thread. I may be under a mistaken belief over something, I need to rule that out first.

    (1-18/18)