MySQL Access from Apache/PHP forbidden by Kernel??
Posted: Sat Apr 22, 2006 6:41 am
Here I am again
First of all, I have to recognice that this is my first SELinux install, so maybe the problem it's there.
The problem I have now is that I can't connect to a MySQL DB from a PHP, I have a connection error and in /var/log/messages I get this:
(yes, that pid is from apache).
The strange thing it's that I can connect to MySQL from Plesk, and PHPMyAdmin (well, "DB WebAdmin"
) works great and I can manage the database from there.
It doesn't seem a DB problem, I can also connect in command line using the same parameters (login, password, host, db...) than I'm using in PHP.
This same application is working great on our current host, BTW.

First of all, I have to recognice that this is my first SELinux install, so maybe the problem it's there.
The problem I have now is that I can't connect to a MySQL DB from a PHP, I have a connection error and in /var/log/messages I get this:
Code: Select all
Apr 22 12:30:50 areyero kernel: audit(1145727050.577:272): avc: denied { search } for pid=21340 comm="httpd" name="/" dev=sdb2 ino=2 scontext=root:system_r:httpd_t tcontext=system_u:object_r:file_t tclass=dir
The strange thing it's that I can connect to MySQL from Plesk, and PHPMyAdmin (well, "DB WebAdmin"

It doesn't seem a DB problem, I can also connect in command line using the same parameters (login, password, host, db...) than I'm using in PHP.
This same application is working great on our current host, BTW.