Apache and suexec issue that wont let me run my python script

Νικόλαος Κούρας nikos.gr33k at gmail.com
Sat Jun 1 01:30:42 EDT 2013


I have asked this in alt.apache.configuration but received no response at all, so i was thinking of you guys as a last resort to this.
Sorry about that but koukos.py need to set a cookies that other scripts depend upon for identification. 'python3 koukos.py' runs properly.

chown nikos:nikos koukos.py
chmod 755 koukos.py 

are all in place.


i want to run a python script 4 days now and i receive this message: 

[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] suexec failure: could not open log file 
[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] fopen: Permission denied 
[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] Premature end of script headers: koukos.py 
[Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] File does not exist: /home/nikos/public_html/500.shtml 

when i tail -F /usr/local/apache/logs/error_log & 

What this error means?

It appears that the effective user of the script does not have permission to open the log file 
that the suexec call requires. 
- fopen reported "permission denied", presumably on the logfile 
- suexec, receiving the fopen "permission denied" error, reported "could not open log file" 

These errors, in turn, seem to have prematurely terminated the script headers that i use in
koukos.py script, causing the koukos.py script to fail. This caused apache to report (with a generic 
and inappropriate error message) that the shtml file that invokes the script failed. 


[code]
root at nikos [/home/nikos/www/cgi-bin]# chmod g+w /usr/local/apache/logs/suexec_log
root at nikos [/home/nikos/www/cgi-bin]# ls -al /usr/local/apache/logs/suexec_log
-rw-rw-r-- 1 root apache 506823 Jun 1 02:55 /usr/local/apache/logs/suexec_log
[/code]

[code]
root at nikos [/home/nikos/www/cgi-bin]# chmod g+w /var/log/httpd/suexec.log
root at nikos [/home/nikos/www/cgi-bin]# ls -l /var/log/httpd/suexec.log
-rw-rw-r-- 1 root root 0 Jun 1 02:52 /var/log/httpd/suexec.log
[/code]


and still iam receiving the same error.....



More information about the Python-list mailing list