Page 1 of 1

MySQL Access from Apache/PHP forbidden by Kernel??

Posted: Sat Apr 22, 2006 6:41 am
by KaTXi
Here I am again :D
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
(yes, that pid is from apache).

The strange thing it's that I can connect to MySQL from Plesk, and PHPMyAdmin (well, "DB WebAdmin" :D ) 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.

Posted: Sat Apr 22, 2006 7:15 am
by scott
Wish I could help you more here, SELinux is still pretty nebulous in its configuration and reporting. It where grsec was about 10 years ago. While I left support in for it in the ASL kernels, I turn it off by default, and rely on the grsec ACL system instead.

Posted: Sat Apr 22, 2006 7:45 am
by KaTXi
I see... I guess that I should disable it, nobody is isn't it anyway :D