PHP shell_exec permission problem

hello all,

when trying to run the following script:

<?php
$output = shell_exec('ls -lart');
echo "<pre>$output</pre>";
?>

I see the following messages in dmesg log

audit(1189616895.644:53): avc: denied { execute } for pid=3874
comm="httpd" name="bash" dev=dm-0 ino=64744
scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:shell_exec_t:s0
tclass=file

This error is because the avc denied acces to httpd to execute the command.

I userd the following command to allow this the shell_exec command:

[root [at] localhost /]# audit2allow -a
allow httpd_t shell_exec_t:file execute;

But unfortunatly, I;ve still the same problem. Does anybody know how to fix
this?

Thanks!!!
Joah Senegal [ Do, 13 September 2007 14:05 ] [ ID #1819461 ]
Webserver » alt.apache.configuration » PHP shell_exec permission problem

Vorheriges Thema: High Avalaibility with Apache on Windows Systems
Nächstes Thema: High Availability with Apache on Windows Systems