470,596 Members | 1,609 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

python cgi permision error

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 :'(

Mar 17 '06 #1
3 1526
av******@gmail.com wrote:
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.
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 :'(


--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
Mar 17 '06 #2
>
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 :(

Mar 18 '06 #3
Sorry accidently replying using my other google account

de********@gmail.com wrote:

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 :(

Mar 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Kurt B. Kaiser | last post: by
1 post views Thread by Sean | last post: by
3 posts views Thread by Saravanan | last post: by
3 posts views Thread by Adam Kozlowski | last post: by
1 post views Thread by Sigfredo N. Jayme | last post: by
reply views Thread by | last post: by
reply views Thread by Kurt B. Kaiser | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.