Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tvheadend: I get always 403 Forbidden after login #4758

Closed
marvelousvts opened this issue Aug 3, 2021 · 14 comments · Fixed by #4921
Closed

Tvheadend: I get always 403 Forbidden after login #4758

marvelousvts opened this issue Aug 3, 2021 · 14 comments · Fixed by #4921
Assignees
Labels

Comments

@marvelousvts
Copy link

Setup

Package Name: Tvheadend
Package Version: 4.3.20210612.29

NAS Model: DS416play
NAS Architecture:
DSM version: 7.0-41890

Expected behavior

I should be able to sign in successfuly with the credential (password) for the user admin that I set up during the installation

Actual behavior

I get always 403 Forbidden

@leowongco
Copy link

same issue, how to fix it?

@Cir02
Copy link

Cir02 commented Aug 9, 2021

hello there,

same problem here with this setup:

Package Name: Tvheadend
Package Version: 4.3.20210612.29

NAS Model: DS118+
DSM version: 7.0-41890

I have tried the wiki faq solution here https://tvheadend.org/projects/tvheadend/wiki/Faq and other solutions in the forum of this page, but nothing.

Any clues?

Thx!

@th0ma7 th0ma7 self-assigned this Aug 22, 2021
@th0ma7
Copy link
Contributor

th0ma7 commented Aug 22, 2021

Can someone provide the command line output listing the two following files?

$ sudo ls -la /var/packages/tvheadend/*/passwd/* /var/packages/tvheadend/*/accesscontrol/*

-rw-r----- 1 sc-tvheadend sc-tvheadend 734 May  2 20:07 /var/packages/tvheadend/var/accesscontrol/d80ccc09630261ffdcae1497a690acc8
-rw-r----- 1 sc-tvheadend sc-tvheadend 106 May  2 21:13 /var/packages/tvheadend/var/passwd/a927e30a755504f9784f23a4efac5109

@marvelousvts
Copy link
Author

Hello Th0ma7,

Below the result of ls -la

ash-4.4# ls -la /var/packages/tvheadend/target/var/passwd/
-rw-r----- 1 sc-tvheadend sc-tvheadend 88 Jun 27 04:28 a927e30a755504f9784f23a4efac5109

ash-4.4# ls -la /var/packages/tvheadend/target/var/accesscontrol/
-rw-r----- 1 sc-tvheadend sc-tvheadend 734 Jun 27 04:28 d80ccc09630261ffdcae1497a690acc8

@th0ma7
Copy link
Contributor

th0ma7 commented Sep 8, 2021

I was able to reproduce the issue, will let you know once I have a proper fix and testing packages.

th0ma7 added a commit to th0ma7/spksrc that referenced this issue Sep 8, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
@th0ma7
Copy link
Contributor

th0ma7 commented Sep 9, 2021

Updated packages with a potential fix being uploaded on my github repository for testing at:
https://github.com/th0ma7/synology/tree/master/packages/dsm7-beta

Please uninstall previous version first then install this version after to confirm if this solves the issue.

If unsure of package architecture needed, please refer to:
https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model

th0ma7 added a commit to th0ma7/spksrc that referenced this issue Sep 10, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Sep 10, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Sep 13, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
@marvelousvts
Copy link
Author

Hello,

I got the tvheadend_x64-7.0_4.3.20210612-30.spk but still I have the same issue.

@th0ma7
Copy link
Contributor

th0ma7 commented Sep 15, 2021

A few questions:

th0ma7 added a commit to th0ma7/spksrc that referenced this issue Sep 28, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Oct 1, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Oct 7, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Oct 13, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
th0ma7 added a commit to th0ma7/spksrc that referenced this issue Oct 13, 2021
1. Migrate to using new STAGING_SPKVAR variable to fix SynoCommunity#4758
2. Also fix SPK_DEPENDS which got superseeded by ffmpeg instead
   of it being updated with added ffmpeg
3. Bump package version
@lionking102
Copy link

Hello,
Here is the solution. It works for me in DSM7. I think thats also interessting for you @th0ma7
Would be great if that would get fixed in the next update.

https://www.painkiller-tech.com/dsm-7-tvheadend-fehler-403-forbidden/

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 16, 2021

That's rather interesting, I'll include that in the next release.
Still, it requires #4797 to get merged.

@marvelousvts
Copy link
Author

Hello, Here is the solution. It works for me in DSM7. I think thats also interessting for you @th0ma7 Would be great if that would get fixed in the next update.

https://www.painkiller-tech.com/dsm-7-tvheadend-fehler-403-forbidden/

Thanks mate! It works!

@Marcoevich
Copy link

Hello @th0ma7 , I have applied the fix @marvelousvts so generously shared with us. However I continue to have this problem.

If I may add a suggestion, could you make it so that you can try to enter the password multiple times? Now immediately after I enter my password it goes straight to 403 forbidden. It would be great if I have a few tries before it locks me out...

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 24, 2021

Actually, just leave the user & passwd empty at first launch. You must do a stop|start on the package prior to that as otherwise you will hit the 403 error again.

@ph818
Copy link

ph818 commented Feb 23, 2023

In case it helps others, here is an English translation:

Fix the 403 forbidden error:
Stops Tvheadend in the package center
Connect to your Synology via SSH as root as described in this guide .
Copy the service-setup file to a location you have access to. In my example, this is the Public folder

cp /var/packages/tvheadend/scripts/service-setup /volume1/public/

In your case, this can of course be a different folder, you just have to adjust it in the command.
open the file directly via the DS or an editor via SSH and look for this line:

SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/tvheadend -f -u [...]

Now add -C between -f and -u and save the file, the new command then looks like this:

SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/tvheadend -f -C -u [...]

Now copy the revised file back again, note that you have to specify your folder instead of Public:

cp /volume1/public/service-setup /var/packages/tvheadend/scripts/

Finally, start the Tvheadend service again in the package center and that's it. Your problem should be resolved and you should now be able to access the Tvheadend web interface again.


According to tvheadend --help, -C is the same as --firstrun, and will create an admin account if no account yet exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants