473,545 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1633
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********@gmai l.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1847
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 259 open ( -5) / 2573 closed (+17) / 2832 total (+12) Bugs : 745 open ( +0) / 4405 closed (+21) / 5150 total (+21) RFE : 150 open ( +1) / 130 closed ( +0) / 280 total ( +1) New / Reopened Patches ______________________
1
2188
by: Sean | last post by:
Hi, Trying to compile the PythonCE (Validus Medical Systems Python 2.3.4) using eVC++ 4.0 and the Smartphone2003 SDK. Linking is generating 28 errors. I dug into the first one (PyErr_Fetch) and it's in pyerrors.h so I don't see why it misses it. Anyone have an idea? TIA
3
2584
by: Saravanan | last post by:
Hello, Im running Python Application as a Windows Service (using windows extensions). But, sporadically the application crashes (crash in Python23.dll) and this stops the service. This problem cann't be reproduced easily in my system and the call stack generated by the application is given below. Please note that the call stack...
3
2129
by: Adam Kozlowski | last post by:
Hello, There is two lines from my script: <script language="javascript1.2"> fso = new ActiveXObject("Scripting.FileSystemObject"); ws = new ActiveXObject("WScript.Network"); </script> Everything working fine, but sometimes some admin change default IE options and during loading the page on screen i can see something like that "Can I
1
1565
by: Sigfredo N. Jayme | last post by:
Good Day! Hello to everyone! I encountered some problems when i tried to debug my activeX dll (in process). This is the scenario. 1.I created a simple activex dll called myproject.dll. I added INitINIFile class. Within that class, I created a Function called 'Read_INI'.
0
1588
by: | last post by:
Greetings. In an effort to get python2.4 on my Centos 3.7, I installed the python bootstrap rpm. This installed 2.4 alongside 2.2 and updated yum to 2.4.0. Oddly, it didn't create a symlink 'python' for either 2.2 or 2.4. I also get a series of troubling dependency errors when I run yum update. Below is the output of the bootstrap...
0
1967
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 385 open (+21) / 3790 closed (+21) / 4175 total (+42) Bugs : 1029 open (+43) / 6744 closed (+43) / 7773 total (+86) RFE : 262 open ( +4) / 291 closed ( +4) / 553 total ( +8) New / Reopened Patches ______________________
2
5156
by: geter | last post by:
Hello, Im using ASP with VBScript. At some point of the code of the application that Im making some changes, I need to get a confirmation from the user if he wants or not to send a confirmation e-mail for the action he performed. Its simple, like this: sendEmail = MsgBox("Send e-mail?",5,"Confirmation") if sendEmail = 6 then
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.