newgentechnologies
asked on
Apache refuses to execute CGI citing permission errors
I am trying to get a CGI script to execute under Apache and while I have checked permissions and determined that Apache should be able to execute the script, it complains. I have pasted the following to demonstrate the problem.
[root@Smokeping htdocs]# ls -l
total 60
drwxr-xr-x 3 1003 1001 4096 Jul 24 2008 cropper
lrwxrwxrwx 1 root root 13 May 16 10:20 index.cgi -> smokeping.cgi
drwxr-xr-x 4 1003 1001 4096 Jul 24 2008 resource
drwxr-xr-x 2 1003 1001 4096 Jul 24 2008 script
-rwxr-xr-x 1 apache 1001 2500 May 27 04:51 smokeping.cgi
-rwxr-xr-x 1 apache root 82 May 18 19:14 test.cgi
-rwxr-xr-x 1 apache 1001 663 Jul 24 2008 tr.cgi
=======================================
From the error log:
=======================================
[Wed May 27 09:12:48 2009] [error] [client 10.255.255.148] (13)Permission denied: exec of '/var/www/html/smokeping/index.cgi' failed
=======================================
Excerpts from the httpd.conf file:
=======================================
AddHandler cgi-script .cgi
ScriptAlias /cgi-bin/ "/usr/local/smokeping/htdocs/"
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/smokeping/htdocs">
AllowOverride None
# Options None
Options +Indexes FollowSymLinks +ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/smokeping">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
As you run this script, through http://example.com/smokeping.cgi or http://example.com/cgi-bin/smokeping.cgi?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.