public inbox for gentoo-hardened@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-hardened] mysql-apache-php
       [not found] <200601210401.k0L41P9p005767@robin.gentoo.org>
@ 2006-01-27  0:30 ` James Smith
  2006-01-27  5:39   ` Rumen Yotov
  2006-01-27  6:34 ` [gentoo-hardened] mysql-apache-php James Smith
  1 sibling, 1 reply; 4+ messages in thread
From: James Smith @ 2006-01-27  0:30 UTC (permalink / raw
  To: gentoo-hardened

I'm having difficulty allowing Apache to talk with MySQL. The logs show my 
policy denying access. Can a policy guru help me with this issue?

Thanks.

James Smith
CT Networks
ctnetworks.ca
-- 
gentoo-hardened@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-hardened] mysql-apache-php
  2006-01-27  0:30 ` [gentoo-hardened] mysql-apache-php James Smith
@ 2006-01-27  5:39   ` Rumen Yotov
  0 siblings, 0 replies; 4+ messages in thread
From: Rumen Yotov @ 2006-01-27  5:39 UTC (permalink / raw
  To: gentoo-hardened

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

On (26/01/06 17:30), James Smith wrote:
> I'm having difficulty allowing Apache to talk with MySQL. The logs show my 
> policy denying access. Can a policy guru help me with this issue?
> 
> Thanks.
> 
> James Smith
> CT Networks
> ctnetworks.ca
> -- 
> gentoo-hardened@gentoo.org mailing list
> 
Hi,
Which one of all hardened projects are you using (grsec,RSBAC,SELinux)?
What is in the logs (on screen)?
Rumen

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-hardened] Re: mysql-apache-php
       [not found] <200601210401.k0L41P9p005767@robin.gentoo.org>
  2006-01-27  0:30 ` [gentoo-hardened] mysql-apache-php James Smith
@ 2006-01-27  6:34 ` James Smith
  2006-01-27  8:28   ` Mivz
  1 sibling, 1 reply; 4+ messages in thread
From: James Smith @ 2006-01-27  6:34 UTC (permalink / raw
  To: gentoo-hardened

Jan 26 16:30:29 [kernel] audit(1138318229.114:51): avc:  denied  { search } 
for  pid=4137 comm="apache2" name="mysqld" dev=hda3 ino=269837 
scontext=system_u:system_r:httpd_t 
tcontext=system_u:object_r:mysqld_var_run_t tclass=dir
Jan 26 16:30:46 [kernel] audit(1138318246.947:54): avc:  denied  
{ name_connect } for  pid=20815 comm="apache2" dest=80 
scontext=system_u:system_r:httpd_t tcontext=system_u:object_r:http_port_t 
tclass=tcp_socket

Here are the two that seem to be most common.

Thanks again.

James
-- 
gentoo-hardened@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-hardened] Re: mysql-apache-php
  2006-01-27  6:34 ` [gentoo-hardened] mysql-apache-php James Smith
@ 2006-01-27  8:28   ` Mivz
  0 siblings, 0 replies; 4+ messages in thread
From: Mivz @ 2006-01-27  8:28 UTC (permalink / raw
  To: gentoo-hardened

James Smith wrote:

>Jan 26 16:30:29 [kernel] audit(1138318229.114:51): avc:  denied  { search } 
>for  pid=4137 comm="apache2" name="mysqld" dev=hda3 ino=269837 
>scontext=system_u:system_r:httpd_t 
>tcontext=system_u:object_r:mysqld_var_run_t tclass=dir
>Jan 26 16:30:46 [kernel] audit(1138318246.947:54): avc:  denied  
>{ name_connect } for  pid=20815 comm="apache2" dest=80 
>scontext=system_u:system_r:httpd_t tcontext=system_u:object_r:http_port_t 
>tclass=tcp_socket
>
>Here are the two that seem to be most common.
>
>Thanks again.
>
>James
>  
>
I think your problem lies somewhere else. I see httpd_t tryes to access 
the mysql server. This is, I think, because you  use mod_php. mod_php 
runs whit in the apache memory space. So this is why is looks like 
apache is trying to access mysql.
This is not secure. To overcome this, you can run php as a cgi program. 
This is slower, but then apache wil exec php the proper way, which cause 
the php to run in the php_t. And the php_t shoul have access to the 
mysqld_var_run_t (probably the mysqld.sock). Then you can also use 
suexec2 to run the scripts as proper users and not as the apache user.

Mivz
-- 
gentoo-hardened@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-27  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200601210401.k0L41P9p005767@robin.gentoo.org>
2006-01-27  0:30 ` [gentoo-hardened] mysql-apache-php James Smith
2006-01-27  5:39   ` Rumen Yotov
2006-01-27  6:34 ` [gentoo-hardened] mysql-apache-php James Smith
2006-01-27  8:28   ` Mivz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox