Project

General

Profile

403 Forbidden

Added by Ulrich G. over 3 years ago

Hi,

I am running a Synology NAS 1817+, and be in need for a replacement for TV Mosaic.
Tvheadend was recommended, so I first activated the SynoCommunity, and thereafter I installed the Tvheadend package from there, together with ffmpeg.
After the installation I used the url with the port :9981 for the web interface.
I was asked for a password during installation, and also when I used the web interface for the first time.
The password I entered on the web interface was rejected, and I ended up with a page: 403 Forbidden.
I found no way to enter the password again, so I deinstalled the package, and made a new installation.
This time I ended up on page 403 without a chance for a password.
I tried it now for several times, with, and without a password during installation, without success.
Furthermore I found no file from Tvheadend within the home/homes shared folder, and port :9982 is not reachable at all.
There is also no icon within the MainMenue of the DSM.

What did I wrong, how can I get these program running, without knowledge in programming?


Replies (14)

RE: 403 Forbidden - Added by Hiro Protagonist over 3 years ago

If you look at the wiki, this issue is covered by the 2nd FAQ entry.

Good luck.

RE: 403 Forbidden - Added by Ulrich G. over 3 years ago

Hi,
thank you for your reply, but I'm aware of this FAQ entry.

Unfortunately I tried to install the app on a Synology System from a package within the App-Center, as described somewhere in the Wiki.
So I used no Arguments and no Debian.
For a Synology System, the FAQ#2 has no description.

I had, during the installation the opportunity to enter a password (No Username!), but it ends up on page 403, with this password, and also if I leave the password empty, during installation. I even get no chance to enter a password anymore, as I end up on page 403 right away, without password-entry promt.

Also, I would expect to find at least some kind of file within the "home"-folder, but there is also no file related to tvheaded, after the "successful" installation.

Has someone a solution?

RE: 403 Forbidden - Added by saen acro over 3 years ago

Simple basic linux knowledge.
command

netstat -lpnt

can show opened by processes ports.
htop

can show running processes and resources.

Answer following questions:
1. Is TVH running?
2. Is port's are correct?

RE: 403 Forbidden - Added by Ulrich G. over 3 years ago

Hi, saen acro,
thank you for your reply also.
Unfortunately I have no basic linux knowledge, that is one of the reasons I use Mac, Synology and other GUI based systems.
I also have no command line on my synology, or be currently able to connect via ssh.

But anyway, the protocol of the Diskstation shows a successful installation of TVH, and with a portscan from my Mac I can also confirm the ports 9981, 9982.

The ports are disappearing, if I made a deinstallation, and reappearing with the reinstallation.

RE: 403 Forbidden - Added by Martin Wolf about 3 years ago

I have the same problem.
I install tvheadend and ffmpeg on my Synology 420+ with DSM 7.
Syno shows Tvheadend is running.
If I want to open the TVheadend webpage I cant look in. They ask me user name and password.
I try several combination but all failed.
Is there any adwise I can try or follow?

RE: 403 Forbidden - Added by saen acro about 3 years ago

Allow access in firewall if it's activated

Someone post somewhere solution how Synology bug block ports, and how to delete some lines from some file fix problem.

RE: 403 Forbidden - my solution - Added by Ueli Schläpfer about 3 years ago

what helped in my case (DSM 7, DS716+) tvheadend 4.3.20210612-29:
- stop tvheadend
- login via ssh (with the terminal-App on your Mac) and copy the file: "service-setup" to a folder you can access:
- cp /var/packages/tvheadend/scripts/service-setup /volume1/public/
- search for this line in the file: service-setup:

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

and insert -C between -f -u

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

- copy the updated file to the scripts-folder:
cp /volume1/public/service-setup /var/packages/tvheadend/scripts/
- start tvheadend

RE: 403 Forbidden - Added by Hiro Nakamoto over 2 years ago

As soon I try to login with user&password I got error 403/forbidden. Did I get anything completly wrong?
DSM 7 on DS1621+, fresh installs, tested many times and the mentioned line in service-setup is already set by default.

RE: 403 Forbidden - Added by A AAA over 2 years ago

Same behavior on a QNAP NAS. When I installed TVHeadend QNAP Package I decided not to use any username/password for the moment.
But now I wanted to add several users (admins and regular users). Whenever I try to login with a named user I get forbidden. Only login without user/pass is possible.

How can I fix this?

A gerneral question:
I'm using TVHeadend only in local intranet, the NAS is not exposed. However VPN access is set up and usable on my internet router where my NAS is connected.
Is it still recommended to use TVHeadend with username/password or can this be omitted?
Or in other words: Is there any possibility that someone from outside can access my NAS and my TVHeadend admin page via browser?

RE: 403 Forbidden - Added by Dave Pickles over 2 years ago

Is it still recommended to use TVHeadend with username/password or can this be omitted?

Only you can answer that question.

If someone broke into your VPN and NAS what other data could they access? Your personal media, emails, bank details? If you are comfortable with the security of that information then maybe you would be OK with running TVHeadend unsecured.

Of course you might also want to protect TVHeadend from being interfered with by someone inside your household...

I don't use TVHeadend's security.

RE: 403 Forbidden - Added by Hiro Nakamoto over 2 years ago

I just need the TvH security to separate admin/config from other users and separate the users from each.

RE: 403 Forbidden - Added by Hiro Nakamoto over 2 years ago

So there is no way to fix the 403-failure?
Or is the TvH security just broken and its recommended not to use it anymore?

RE: 403 Forbidden - Added by Ulrich G. over 2 years ago

Unfortunately yes, it seems that there is no way to fix that problem!
I have deleted, and reinstalled and so on several times, and just gave up on this.

RE: 403 Forbidden - Added by Mark Clarkstone over 2 years ago

Invalid or forgotten login info?

Locate and cd to the tvheadend directory that contains the tvheadend folders as shown below, you may not have all of these files and folders but you should see "config" and most of them.

root@rpi3-1-1g:/home/mark# ls -lah ../hts/.hts/tvheadend/
total 4.9M
drwxr-xr-x 13 hts hts   4.0K Mar 15 15:57 .
drwxr-xr-x  3 hts hts   4.0K Jan 26 08:43 ..
drwx------  2 hts video 4.0K Jan 26 09:41 accesscontrol
drwx------  2 hts video 4.0K Mar 15 15:55 backup
drwx------  2 hts video  24K Apr 13 14:04 bouquet
drwx------  2 hts video 4.0K Jan 26 08:43 caclient
drwx------  4 hts video 4.0K Jan 26 23:39 channel
drwx------  2 hts video 4.0K Mar 15 15:42 codec
-rw-------  1 hts video 1.6K Mar 15 15:55 config
drwx------  3 hts video 4.0K Jan 26 08:43 dvr
-rw-------  1 hts video 4.8M Mar 15 15:57 epgdb.v3
drwx------  3 hts video 4.0K Jan 26 08:54 epggrab
drwx------  4 hts video 4.0K Jan 26 08:50 input
-rw-r--r--  1 hts video   22 Mar 15 15:57 .lock
drwx------  2 hts video 4.0K Mar 15 15:42 profile
-rw-------  1 hts hts     47 Mar 15 15:55 superuser
drwx------  2 hts video 4.0K Jan 26 08:48 timeshift

Notice the "superuser" file? In the above? If it doesn't exist create it, and make sure that it is owned and readable by your tvheadend user...

cd /home/hts/.hts/tvheadend/
# The path above may be different for your system, so modify this carefully

touch superuser
chmod 660 superuser
chown hts:hts superuser
# change hts:hts to match the user/group tvheadend is running as, use "ls -lah" on your tvheadend directory to find those out

cat << EOF > superuser
{
"username": "adminback",
"password": "adminpass" 
}
EOF

# This backdoor user & password must not already exist within your tvheadend config to avoid random issues.

cat superuser
# This should print out what we did before

# Now restart tvheadend & it should pickup this superuser file & allow you to bypass the others you set yourself.
systemctl restart tvheadend
# or use whatever init your system uses

Constant 403 on trying to access the webui after failing to login?

Your browser is caching and automatically sending old and/or invalid login info. Remove any saved passwords (in your browser) then close the browser completely. And try again. If that fails, try another browser or an in-private window.

    (1-14/14)