python cgi permision error

A

avenpace

Hi

I have python cgi script, but when I call it I got server internal
error. The log in my apache is

[Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] (13)Permission
denied: exec of '/srv/www/cgi-bin/helo.cgi' failed
[Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] Premature end of
script headers: helo.cgi
[Sat Mar 18 04:20:09 2006] [notice] caught SIGTERM, shutting down

I have set the correct permision for the script(755) and the script is
also own by apache uid.
I think somehow apache cannot run python to process my python cgi
script, but I don't know what I should do anymore.
When I run it via shell, the cgi work fine
I also can't make my mod_python .py write anything inside my /var/www
dir although permision already true, even if I gave /var/www permision
recursively to 777(I know this not good idea, just for testing), still
have permision denied stuff.
Btw I'm using SuSE 10, Apache/2.0.54, and python 2.4
Sighhh, there's a lot of weird thing with my apache and I can't
understand why :'(
 
D

David Bear

Hi

I have python cgi script, but when I call it I got server internal
error. The log in my apache is

[Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] (13)Permission
denied: exec of '/srv/www/cgi-bin/helo.cgi' failed
[Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] Premature end of
script headers: helo.cgi
[Sat Mar 18 04:20:09 2006] [notice] caught SIGTERM, shutting down

I have set the correct permision for the script(755) and the script is
also own by apache uid.

assuming you are running this python script the standard cgi way and not
through modpython or fastcgi.

try debugging this way.

execute the python script from command line as the web user.

make sure your python script prints the standard

"""Content-type: text/html

"""

header.
 
D

devilandme

assuming you are running this python script the standard cgi way and not
through modpython or fastcgi.
yes I'm running it in standard cgi way coz my provider only allow me
that way.
And it's really just simple script. Sorry for the dumb question, I know
modpython but what do you mean by fast cgi
try debugging this way.

execute the python script from command line as the web user.

make sure your python script prints the standard

"""Content-type: text/html

"""

Yess I've done that. I have also run it on windows machine and it work.
It seem my apache from SuSE 10.0 had some weird error permision that I
don't understand when running cgi. I'm also had that kinda error if I
running other cgi on perl or binary cgi :(
 
A

avenpace

Sorry accidently replying using my other google account

yes I'm running it in standard cgi way coz my provider only allow me
that way.
And it's really just simple script. Sorry for the dumb question, I know
modpython but what do you mean by fast cgiYess I've done that. I have also run it on windows machine and it work.
It seem my apache from SuSE 10.0 had some weird error permision that I
don't understand when running cgi. I'm also had that kinda error if I
running other cgi on perl or binary cgi :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top