modsecurity phpmyadmin error

General discussions around KeyHelp.
Post Reply
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

modsecurity phpmyadmin error

Post by saviorhost »

I enabled ModSecurity. However, I get an error when I try to upload SQL through phpMyAdmin.

Forbidden

You don't have permission to access this resource.
User avatar
Tobi
Community Moderator
Posts: 3603
Joined: Thu 5. Jan 2017, 13:24

Re: modsecurity phpmyadmin error

Post by Tobi »

Just disable ModSecurity?
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Tobi wrote: Mon 16. Mar 2026, 16:48 Just disable ModSecurity?
Wouldn't server security be a problem? Many different websites are hosted there.
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Is there anyone who can offer help?
User avatar
Tobi
Community Moderator
Posts: 3603
Joined: Thu 5. Jan 2017, 13:24

Re: modsecurity phpmyadmin error

Post by Tobi »

What kind of issue do you expect?
In fact nobody uses ModSecurity and everybody is fine.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Tobi wrote: Wed 18. Mar 2026, 18:50 What kind of issue do you expect?
In fact nobody uses ModSecurity and everybody is fine.
I'm a hosting company. Even now, I host hundreds of websites. That's why I need to provide protection.
User avatar
mhagge
Community Moderator
Posts: 619
Joined: Wed 8. Aug 2018, 15:19

Re: modsecurity phpmyadmin error

Post by mhagge »

But that's also the reason for the problems. mod_security isn't a system to turn on and forget about; it requires fine-tuning, adaptation to the software used, and constant monitoring; otherwise, you'll end up with false positives forever. This is - especially as a host with hundreds of websites – practically impossible, some customer is probably using something or using something in such a way that mod_security causes problems and you have to adapt it for that.

In this respect, @Tobi's advice is correct - in such an environment, mod_security cannot be used effectively without encountering various minor and major problems

If it prevents SQL files from being uploaded to PHPMyAdmin, it ultimately does exactly what it's intended to do. If you don't want that, you have to define an appropriate exception. But as I said: especially with customers it's practically impossible, they just see something that doesn't work.
User avatar
Jolinar
Community Moderator
Posts: 4285
Joined: Sat 30. Jan 2016, 07:11
Location: Weimar (Thüringen)
Contact:

Re: modsecurity phpmyadmin error

Post by Jolinar »

saviorhost wrote: Wed 18. Mar 2026, 18:19 Is there anyone who can offer help?
The issue could be fixed by targeted whitelisting instead of full disablement.

Check ModSecurity logs for the blocking rule ID, then whitelist it or the /phpMyAdmin/ path in the config (/etc/modsecurity.d/). This should preserves overall security.
Wenn jemand inkompetent ist, dann kann er nicht wissen, daß er inkompetent ist. (David Dunning)

Data Collector für Community Support
___
Ich verwende zwei verschiedene Schriftfarben in meinen Beiträgen /
I use two different font colors in my posts:
  • In dieser Farbe schreibe ich als Moderator und gebe moderative Hinweise oder begründe moderative Eingriffe /
    In this color, I write as a moderator and provide moderative guidance or justify moderative interventions
  • In dieser Farbe schreibe ich als Community Mitglied und teile meine private Meinung und persönlichen Ansichten mit /
    In this color, I write as a community member and share my personal opinions and views
User avatar
Tobi
Community Moderator
Posts: 3603
Joined: Thu 5. Jan 2017, 13:24

Re: modsecurity phpmyadmin error

Post by Tobi »

@saviorhost
Do you use KeyHelp Pro?
Putting customers in jailroot is probably the best security you can get.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Tobi wrote: Thu 19. Mar 2026, 11:22 @saviorhost
Do you use KeyHelp Pro?
Putting customers in jailroot is probably the best security you can get.
Yes, I use KeyHelp Pro. How exactly do I install jailroot? Is there an article or topic about it?
User avatar
Alexander
Keyweb AG
Posts: 4789
Joined: Wed 20. Jan 2016, 02:23

Re: modsecurity phpmyadmin error

Post by Alexander »

To enable it for a client:
- "User Administration -> Add or edit a client -> Permissions -> Enable SSH + Restricted SSH environment"

Further configuration can be done here:
- "Configuration -> Restricted SSH Environment"
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Alexander wrote: Thu 19. Mar 2026, 14:47 To enable it for a client:
- "User Administration -> Add or edit a client -> Permissions -> Enable SSH + Restricted SSH environment"

Further configuration can be done here:
- "Configuration -> Restricted SSH Environment"
Dear Aleksander;

Yes, I saw that. What do I need to write there? Is there any document related to it?
User avatar
Alexander
Keyweb AG
Posts: 4789
Joined: Wed 20. Jan 2016, 02:23

Re: modsecurity phpmyadmin error

Post by Alexander »

saviorhost wrote: Thu 19. Mar 2026, 15:42 What do I need to write there?
Where exactly?
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
saviorhost
Posts: 33
Joined: Sun 11. Jan 2026, 13:51
Location: Turkiye
Contact:

Re: modsecurity phpmyadmin error

Post by saviorhost »

Alexander wrote: Thu 19. Mar 2026, 15:50
saviorhost wrote: Thu 19. Mar 2026, 15:42 What do I need to write there?
Where exactly?
Configuration -> Restricted SSH Environment
Post Reply