[CentOS] SELinux prevents my PHP script from sending mail

Eero Volotinen eero.volotinen at iki.fi
Thu May 3 15:05:07 UTC 2012


2012/5/3 Alan M. Evans <ame1 at extratech.com>:
> [ Sorry about the private message. Reply-to header wasn't set in your
> message. Resending to all... ]
>
> On Thu, 2012-05-03 at 10:19 -0400, Daniel J Walsh wrote:
>
>> What AVC messages are you seeing?
>
> None now, as I said. But before I applied the local policy, the denials
> were:

How about trying something like this:

su - useraccount-under-script-runs -s /bin/bash

and then run following commands:

/usr/bin/php-cgi /var/www/html/mydomain/email-cgi.php or
strace /usr/bin/php-cgi /var/www/html/mydomain/email-cgi.php


--
Eero



More information about the CentOS mailing list