Page 1 of 1
Adminpanel nicht aufrufbar 403 Forbidden
Posted: Thu 8. Apr 2021, 22:57
by Revisor
Moin,
ich nutze Keyhelp schon lange, sehr problemlos und bin sehr zufrieden. Nun hat sich aber bei mir ein Fehler eingeschlichen und ich finde einfach keine Lösung. Ich kann die Adminoberfläche nicht mehr aufrufen. Ich erhalte den Fehler 403 Forbidden. Alle Seiten funktionieren problemlos.
Technische Angaben:
Ubuntu 20.04. Keyhelp 21. vServer. Zusätzlich installiert wurde nur Docker.
Der DocumentRoot in der keyhelp.conf ist korrekt gesetzt, die Datei wurde nie geändert. M.E. sind auch die Rechte im Ordner /home/keyhelp/www/keyhelp korrekt. Wurden ebenfalls nicht geändert.
Die Fehlermeldung in /var/log/apache2/keyhelp/error.log lautet:
Code: Select all
[Thu Apr 08 22:38:43.532470 2021] [core:error] [pid 9919:tid 140474666202880] (13)Permission denied: [client] AH00035: access to / denied (filesystempath '/home/keyhelp/www') because search permissions are missing on a component of the path
Alles was ich im Forum gefunden habe, habe ich ausprobiert. Aber ich finde leider keine Lösung. Vielleicht hat noch jemand eine Idee. Für Unterstützung wäre ich sehr dankbar.
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 07:34
by OlliTheDarkness
Der Ordner /home/keyhelp sollte 750, www sollte 755 und Besitzer versteht sich von allein keyhelp.
Mir scheint eines dieser trifft nicht zu.
Ggf. hilft dir auch
Code: Select all
php /home/keyhelp/www/keyhelp/bin/toolbox.php
weiter, Optionen 1, 5 und 6.
Falls Fehler geworfen werden, diese mal wissen lassen.
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 09:58
by Revisor
Moin,
vielen Dank für deine Hinweise und Unterstützung.
Ich habe alle Rechte überprüft und vorsorglich auch nochmal gesetzt.

Ich habe die Toolbox genutzt und 1, 5 und 6 durchgeführt. Es gab keine Fehler. Außer:
Da tatsächlich das Zertifikat für das Adminpanel in 29 Tagen abläuft kann es erneuert werden.
Alles für die Challange wird richtig angelegt. Aber beim Aufruf der URL kommt dann ebenfalls ein 403 Forbidden.
Auch hier liegt eigentlich eine Rechtefehler im Ordner /home/keyhelp/www/ nahe. Das ist mir klar.
Ich hab mittels dig und wget geprüft ob richtig aufgelöst wird. Das ist der Fall. Aber auch bei wget: 403.
Also muss es m.E. an der .conf für das Panel liegen. Ich bin nur sehr verwirrt, weil ich das nie angefasst habe.
Vielleicht aber auch am keyhelp user? Nicht in der richtigen Gruppe?
Gibt es da eine Standardkonfiguration die ich zurückschreiben kann?
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 10:13
by OlliTheDarkness
Mal die, in meinen Augen auf die Schnelle, wichtigen / zuständigen Daten zum Vergleich
/etc/apache2/keyhelp/keyhelp.conf
Code: Select all
#
# _ __ _ _ _ (R)
# | |/ /___ _ _| |_| |___| |___
# | | / -_) |_/ | _ | -_) | _ \
# |_|\_\___|\__, |_| |_|___|_| _/
# |___/ |_|
#
# Webserver configuration for apache 2.4-fcgid
#
# Log format
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" keyhelp_log
</IfModule>
<IfModule !mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" 0 0" keyhelp_log
</IfModule>
# KeyHelp / Tools
<VirtualHost *:443>
ServerName PANEL.HOSTNAME.de
ServerAdmin root@PANEL.HOSTNAME.de
DocumentRoot /home/keyhelp/www/keyhelp
Options -Indexes
SuexecUserGroup "keyhelp" "keyhelp"
# Logging
LogLevel warn
CustomLog "${APACHE_LOG_DIR}/keyhelp/access.log" combined
ErrorLog "${APACHE_LOG_DIR}/keyhelp/error.log"
# SSL/TLS
SSLEngine On
SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt
# Aliases
Alias /awstats-icons "/usr/share/awstats/icon"
Alias /db-administration "/home/keyhelp/www/db-administration"
Alias /webmail "/home/keyhelp/www/webmail"
Alias /webstats "/home/keyhelp/www/kh.webstats"
# Compatibility aliases (do not break existing bookmarks)
Alias /phpmyadmin "/home/keyhelp/www/db-administration"
# Autoconfig / Autodiscover
AliasMatch (?i)^/autoconfig(.*) /home/keyhelp/www/keyhelp/misc/emailconfig$1
AliasMatch (?i)^/autodiscover(.*) /home/keyhelp/www/keyhelp/misc/emailconfig$1
# PHP files
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/keyhelp_keyhelp.socket|fcgi://keyhelp_keyhelp.socket"
</FilesMatch>
# Set some proxy properties (the string "unique-domain-name-string" should match
# the one set in the FilesMatch directive.
<Proxy fcgi://keyhelp_keyhelp.socket>
ProxySet connectiontimeout=5 timeout=120
</Proxy>
# KeyHelp
<Directory "/home/keyhelp/www/keyhelp">
<Files "license.txt">
Require all denied
</Files>
Require all granted
AllowOverride All
</Directory>
<Directory "/home/keyhelp/www/keyhelp/bin/">
Require all denied
</Directory>
# Statistics
<Directory "/home/keyhelp/www/kh.webstats">
Require all denied
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>
# DB administration
<Directory "/home/keyhelp/www/db-administration">
Require all granted
AllowOverride All
</Directory>
# Webmail
<Directory "/home/keyhelp/www/webmail">
Require all granted
AllowOverride All
</Directory>
# Mime types
<IfModule mod_mime.c>
# Fonts
AddType font/woff2 woff2
</IfModule>
# Expire headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 days"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType text/plain "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Scripts
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
# Images / Icons
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/vnd.microsoft.icon "access plus 1 month"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
# Fonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType font/woff2 "access plus 1 month"
# Others
ExpiresByType application/pdf "access plus 1 month"
</IfModule>
</VirtualHost>
# Redirect HTTP -> HTTPS
<VirtualHost *:80>
ServerName PANEL.HOSTNAME.de
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]).*$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/
</IfModule>
Redirect / https://PANEL.HOSTNAME.de/
</VirtualHost>
# User vhosts
IncludeOptional keyhelp/vhosts/*.conf
# Webmail subdomain
Include keyhelp/webmail.conf
# Autoconfig subdomain
Include keyhelp/autoconfig.conf
# Subdomain catch-all
IncludeOptional keyhelp/subdomain_catch_all.conf
# Default page, if domain not available.
<VirtualHost *:443>
ServerName PANEL.HOSTNAME.de
ServerAlias *.PANEL.HOSTNAME.de
SSLEngine On
SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt
Redirect / https://PANEL.HOSTNAME.de/index.php?page=notavailable
</VirtualHost>
# Default page | Redirect HTTP -> HTTPS
<VirtualHost *:80>
ServerName PANEL.HOSTNAME.de
ServerAlias *.PANEL.HOSTNAME.de
Redirect / https://PANEL.HOSTNAME.de/index.php?page=notavailable
</VirtualHost>
/etc/php/7.3/fpm/pool.d/keyhelp.conf
Code: Select all
[keyhelp]
listen = /run/php/keyhelp_keyhelp.socket
listen.owner = keyhelp
listen.group = keyhelp
listen.mode = 0666
user = keyhelp
group = keyhelp
pm = ondemand
pm.max_children = 10
pm.max_requests = 0
env[TMP] = /tmp/keyhelp/
env[TMPDIR] = /tmp/keyhelp/
env[TEMP] = /tmp/keyhelp/
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f root@PANEL.HOSTNAME.de
php_admin_value[open_basedir] = /
php_admin_value[session.save_path] = /tmp/keyhelp/
php_admin_value[upload_tmp_dir] = /tmp/keyhelp/
php_admin_value[memory_limit] = 128M
php_admin_value[post_max_size] = 70M
php_admin_value[upload_max_filesize] = 64M
php_admin_value[max_execution_time] = 180
php_admin_value[max_input_vars] = 2000
/etc/apache2/suexec/www-data
Code: Select all
/home/
# /var/www
# public_html/cgi-bin
# The first two lines contain the suexec document root and the suexec userdir
# suffix. If one of them is disabled by prepending a # character, suexec will
# refuse the corresponding type of request.
# This config file is only used by the apache2-suexec-custom package. See the
# suexec man page included in the package for more details.
/etc/group
Code: Select all
...
www-data:x:33:keyhelp
keyhelp:x:1000:
keyhelp_file_manager:x:1001:khuser1,khuser2
keyhelp_nossh:x:1002:khuser1
keyhelp_noftp:x:1003:
keyhelp_suspended:x:1004:
keyhelp_chroot:x:1005:khuser12,khuser1
...
/etc/passwd
Code: Select all
...
keyhelp:x:1000:1000::/home/keyhelp/:/bin/false
...
Re: Adminpanel nicht aufrufbar 403 Forbidden [GELÖST]
Posted: Fri 9. Apr 2021, 10:42
by Alexander
Wie sehen die Rechte im Ordner /home/ aus?
KeyHelp muss in der Gruppe www-data sein, ist das der Fall?
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 10:52
by Revisor
Und nochmal herzlichen Dank für die Unterstützung!
Ich habe alles geprüft. Es ist alles vorhanden.
Es fehlt allerdings php 7.3. Nur 7.4 ist vorhanden. Aber das ist m.E. der Standard für Ubuntu 20.04.
Wird auch via php -v / -i und phpinfo() angezeigt. Oder muss das installiert sein?
Ich hab nochmal nach falschen htaccess Dateien gesucht. Auch nichts gefunden.
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 10:57
by Revisor
Danke euch beiden.
So ein dummer Fehler.
Ich hab immer alle Rechte geprüft aber nie auf der /home Ebene.
Jetzt geht alles wieder. Aber warum das gesetzt wurde? Vielleicht nich mehr so spät am Abend am System arbeiten.
Also, danke und entschuldigt, dass ich euch wegen so einer Banalität eingespannt habe!
Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 11:07
by OlliTheDarkness
Revisor wrote: ↑Fri 9. Apr 2021, 10:57
Danke euch beiden.
So ein dummer Fehler.
Ich hab immer alle Rechte geprüft aber nie auf der /home Ebene.
Jetzt geht alles wieder. Aber warum das gesetzt wurde? Vielleicht nich mehr so spät am Abend am System arbeiten.
Also, danke und entschuldigt, dass ich euch wegen so einer Banalität eingespannt habe!
Spät abends / Nachts ist, zumindest bei mir, nicht der Grund für Fehler
Eher die Ablenkungen nebenbei beim Versuch wach zu bleiben
Passiert

Re: Adminpanel nicht aufrufbar 403 Forbidden
Posted: Fri 9. Apr 2021, 13:24
by Tobi
Sorry Leute, aber ich habe den falschen Beitrag und die Folgebeiträge gelöscht damit nicht jemand irrtümlich die „Tipps“ von oben nach unten einfach ausführt.