PHP shell_exec permission problem

PHP shell_exec permission problem

am 13.09.2007 14:05:27 von Joah Senegal

hello all,

when trying to run the following script:

$output = shell_exec('ls -lart');
echo "

$output
";
?>

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@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!!!