[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache and suexec breaks my cgi script



I've been beating my head into a wall trying to figure out why my
"hello world" cgi script won't run.  It turns out that disabling
suexec (which is enabled by default in the apache package) makes the
problems vanish.  Now I want to know what is causing the problem.

I skimmed through the security requirements listed at
http://httpd.apache.org/docs/suexec.html, but didn't see anything
obviously wrong with my system.  Here's the relevant info :

~~ /var/log/apache/suexec.log
[2002-06-07 23:55:40]: info: (target/actual) uid: (dman/dman) gid: (dman/dman) cmd: hello.py
[2002-06-07 23:55:40]: emerg: cannot get docroot information
(/home/dman)

~~ /etc/apache/httpd.conf (the interesting parts)
UserDir public/html
AddHandler cgi-script .cgi .sh .py .pl

# let me have CGI scripts
<Directory ~dman/public/html/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>


drwx--x--x   92 dman     dman         4096 Jun  8 00:13 /home/dman
drwxr-xr-x    5 dman     dman         4096 Apr 23 23:10 /home/dman/public
drwxr-xr-x   15 dman     dman         4096 May 29 02:02 /home/dman/public/html
drwxr-xr-x    2 dman     dman         4096 Jun  8 00:18 /home/dman/public/html/cgi-bin
-rwxr-xr-x    1 dman     dman           90 Jun  7 23:32 /home/dman/public/html/cgi-bin/hello.py

~~ hello.py
#!/usr/bin/python2.2 

print "Content-type: text/plain\n\n"
print "hello world"


What am I doing wrong?  Should I just disable suexec and forget about it?

TIA,
-D

-- 

"Wipe Info uses hexadecimal values to wipe files. This provides more 
security than wiping with decimal values." -- Norton SystemWorks 2002 Manual
 
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg

Attachment: pgpQLL9EK1g3y.pgp
Description: PGP signature


Reply to: