<div>httpd.conf:</div><div><br></div><div><VirtualHost *:80></div><div>ServerAdmin <a href="mailto:me@creative.vi">me@creative.vi</a></div><div>DocumentRoot /var/www/html/<a href="http://angrynates.com">angrynates.com</a></div>
<div>ServerName <a href="http://angrynates.com">angrynates.com</a></div><div>Options +ExecCGI -IncludesNoExec</div><div><Directory /var/www/html/<a href="http://angrynates.com/global_solutions/*">angrynates.com/global_solutions/*</a>></div>
<div> Options +ExecCGI</div><div> AllowOverride Options</div><div> AllowOverride FileInfo</div><div> #AddHandler mod_python .py</div><div> #PythonHandler mod_python.publisher</div><div> #PythonDebug On</div><div><br></div>
<div></Directory></div><div></VirtualHost></div><div><br></div><div><br></div><div>#ls -lZ</div><div>drwxr-xr-x  root root                                  1024</div><div>drwxr-xr-x  root root                                  1132</div>
<div>drwxr-xr-x  root root                                  1255</div><div>-rwxr-xr-x  root root                                  About_Us_frame.py</div><div>-rwxr-xr-x  root root                                  About_Us.py</div>
<div>-rwxr-xr-x  root root                                  ajax.cgi.txt</div><div>-rwxr-xr-x  root root                                  ajax.html</div><div>-rwxr-xr-x  root root                                  Catalog_frame.py</div>
<div>-rwxr-xr-x  root root                                  Catalog.py</div><div>-rwxr-xr-x  root root                                  cats_edit2.py</div><div>-rwxr-xr-x  root root                                  cats_edit.py</div>
<div>-rwxr-xr-x  root root                                  client2.py</div><div>-rwxr-xr-x  root root                                  client_delete2.py</div><div>-rwxr-xr-x  root root                                  client_delete.py</div>
<div>-rwxr-xr-x  root root                                  client_edit2.py</div><div>-rwxr-xr-x  root root                                  client_edit3.py</div><div>-rwxr-xr-x  root root                                  client_edit.py</div>
<div>-rwxr-xr-x  root root                                  client.py</div><div>-rwxr-xr-x  root root                                  Contact_Us_frame.py</div><div>-rwxr-xr-x  root root                                  Contact_Us.py</div>
<div>-rwxr-xr-x  root root                                  credit_app.doc</div><div>-rwxr-xr-x  root root                                  Credit Application DP Dist .doc</div><div>-rwxr-xr-x  root root                                  Customer_Templates_frame.py</div>
<div>-rwxr-xr-x  root root                                  Customer_Templates.py</div><div>-rwxr-xr-x  root root                                  display_spreadsheet2.py</div><div>-rwxr-xr-x  root root                                  display_spreadsheet.py</div>
<div>-rwxr-xr-x  root root                                  EDDIE-Tool-1.0.0.tar.gz</div><div>-rwxr-xr-x  root root                                  email.py</div><div>-rwxr-xr-x  root root                                  error.log.0</div>
<div>-rwxr-xr-x  root root                                  favicon.gif</div><div>-rwxr-xr-x  root root                                  favicon.ico</div><div>-rwxr-xr-x  root root                                  Forms_frame.py</div>
<div>-rwxr-xr-x  root root                                  Forms.py</div><div>-rwxr-xr-x  root root                                  fw9.pdf</div><div>-rwxr-xr-x  root root                                  getResolution.py</div>
<div>-rw-r--r--  root root                                  hello.py</div><div>drwxr-xr-x  root root                                  images</div><div>drwxr-xr-x  root root                                  images1024</div>
<div>drwxr-xr-x  root root                                  images1132</div><div>drwxr-xr-x  root root                                  images1255</div><div>drwxr-xr-x  root root                                  images-old</div>
<div>-rwxr-xr-x  root root                                  index_frame.py</div><div>-rwxr-xr-x  root root                                  index.html</div><div>-rwxr-xr-x  root root                                  index.py</div>
<div>-rwxr-xr-x  root root                                  login.py</div><div>-rwxr-xr-x  root root                                  login.pyc</div><div>-rwxr-xr-x  root root                                  Office_Supplies_frame.py</div>
<div>-rwxr-xr-x  root root                                  Office_Supplies.py</div><div>-rwxr-xr-x  root root                                  Paper_Plastics_frame.py</div><div>-rwxr-xr-x  root root                                  Paper_Plastics.py</div>
<div>-rwxr-xr-x  root root                                  particulars.py</div><div>-rwxr-xr-x  root root                                  particulars.pyc</div><div>drwxr-xr-x  root root                                  pics</div>
<div>-rwxr-xr-x  root root                                  ping.py</div><div>-rwxr-xr-x  root root                                  products2.py</div><div>-rwxr-xr-x  root root                                  products3.py</div>
<div>-rwxr-xr-x  root root                                  products_cats.py</div><div>-rwxr-xr-x  root root                                  products_delete2.py</div><div>-rwxr-xr-x  root root                                  products_delete3.py</div>
<div>-rwxr-xr-x  root root                                  products_delete.py</div><div>-rwxr-xr-x  root root                                  products_edit2.py</div><div>-rwxr-xr-x  root root                                  products_edit3.py</div>
<div>-rwxr-xr-x  root root                                  products_edit.py</div><div>-rwxr-xr-x  root root                                  products_items.py</div><div>-rwxr-xr-x  root root                                  products_move2.py</div>
<div>-rwxr-xr-x  root root                                  products_move3.py</div><div>-rwxr-xr-x  root root                                  products_move.py</div><div>-rwxr-xr-x  root root                                  salesperson2.py</div>
<div>-rwxr-xr-x  root root                                  salesperson_delete2.py</div><div>-rwxr-xr-x  root root                                  salesperson_delete.py</div><div>-rwxr-xr-x  root root                                  salesperson_edit2.py</div>
<div>-rwxr-xr-x  root root                                  salesperson_edit3.py</div><div>-rwxr-xr-x  root root                                  salesperson_edit.py</div><div>-rwxr-xr-x  root root                                  salesperson.py</div>
<div>drwxr-xr-x  root root                                  simplemail</div><div>-rwxr-xr-x  root root                                  spreadsheet2.py</div><div>-rwxr-xr-x  root root                                  spreadsheet3.py</div>
<div>-rwxr-xr-x  root root                                  spreadsheet4.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_delete2.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_delete.py</div>
<div>-rwxr-xr-x  root root                                  spreadsheet_delete_rows2.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_delete_rows3.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_delete_rows.py</div>
<div>-rwxr-xr-x  root root                                  spreadsheet_edit2.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_edit3.py</div><div>-rwxr-xr-x  root root                                  spreadsheet_edit.py</div>
<div>-rwxr-xr-x  root root                                  spreadsheet.py</div><div>drwxr-xr-x  root root                                  spreadsheets</div><div>-rwxr-xr-x  root root                                  start.py</div>
<div>-rwxr-xr-x  root root                                  stuff.txt</div><div>-rwxr-xr-x  root root                                  templateFrame.py</div><div>-rwxr-xr-x  root root                                  templateFrame.pyc</div>
<div>-rwxr-xr-x  root root                                  template.py</div><div>-rwxrwxrwx  root root                                  template.pyc</div><div>-rwxr-xr-x  root root                                  test2.py</div>
<div>-rw-r--r--  root root                                  test2.pyc</div><div>-rwxr-xr-x  root root                                  test.html</div><div>-rwxr-xr-x  root root                                  test.py</div>
<div>-rwxr-xr-x  root root                                  tsd_sales_tax_dealer_or_purchaser_exemption_certificate_st5.pdf</div><div><br></div><div><br></div><br><div class="gmail_quote">On Sat, Nov 7, 2009 at 4:09 PM, Rami Chowdhury <span dir="ltr"><<a href="mailto:rami.chowdhury@gmail.com">rami.chowdhury@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Saturday 07 November 2009 06:13:11 Victor Subervi wrote:<br>
> I have a serious privileges problem that is making it impossible to serve<br>
> python pages on a CentOS server. It appears that nobody on the CentOS<br>
> discussion list has a solution to this problem. I'm desperate and hoping<br>
> someone on this list can help.<br>
><br>
> [Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] (2)No such file<br>
>  or directory: exec of<br>
>  '/var/www/html/<a href="http://angrynates.com/global_solutions/index.py" target="_blank">angrynates.com/global_solutions/index.py</a>' failed, referer:<br>
>  <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] Premature end of<br>
> script headers: index.py, referer: <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
><br>
> Now, the file does exist:<br>
><br>
> [root@13gems global_solutions]# pwd<br>
> /var/www/html/<a href="http://angrynates.com/global_solutions" target="_blank">angrynates.com/global_solutions</a><br>
> [root@13gems global_solutions]# ls<br>
> ....<br>
> -rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.py<br>
> ....<br>
> and it serves just fine on another server, so there is no "premature end of<br>
> script headers".<br>
><br>
><br>
> Here's where it gets really weird. If I copy the code for index.py and<br>
> template.py which the former calls, and create files test.py and test2.py<br>
> and paste the code from the former files in those new files changing only<br>
> the import statement from "template" to "test2", the tests will resolve!!<br>
> Now, the ownership and mode are identical on all of them!!<br>
><br>
><br>
> [root@13gems global_solutions]# ls -al | grep test.py<br>
> -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py<br>
> [root@13gems global_solutions]# ls -al | grep test2.py<br>
> -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py<br>
> [root@13gems global_solutions]# ls -al | grep index.py<br>
> -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py<br>
> [root@13gems global_solutions]# ls -al | grep template.py<br>
> -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py<br>
> -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc<br>
><br>
> where test.py is identical to index.py (other than the necessary import)<br>
>  and template is identical to test2.py<br>
><br>
><br>
> fixfiles relabel /var/www/html<br>
> # might just work<br>
> It didn't<br>
><br>
> touch /.autorelabel<br>
> # and then reboot will relabel all copied files to the correct contexts for<br>
> the location<br>
> I rebooted apache with no luck<br>
><br>
> or you could turn off SELinux and reboot<br>
> I did that and the following two solutions with no luck:<br>
> echo 0 >/selinux/enforce<br>
><br>
> [root@13gems ~]# cd /etc/<br>
> [root@13gems etc]# mv selinux/ selinux.BAK<br>
> [root@13gems etc]# mkdir selinux<br>
> [root@13gems etc]# echo 0>/selinux/enforce<br>
><br>
> ...and the problem continues:<br>
> [root@13gems etc]# tail /var/log/httpd/error_log<br>
> [Fri Nov 06 12:51:49 2009] [error] [client 66.248.168.98] Premature end of<br>
> script headers: index.py, referer: <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] (2)No such file<br>
>  or directory: exec of<br>
>  '/var/www/html/<a href="http://angrynates.com/global_solutions/index.py" target="_blank">angrynates.com/global_solutions/index.py</a>' failed, referer:<br>
>  <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] Premature end of<br>
> script headers: index.py, referer: <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 12:56:20 2009] [error] [client 67.96.172.81] (2)No such file or<br>
> directory: exec of '/var/www/html/<a href="http://angrynates.com/global_solutions/index.py" target="_blank">angrynates.com/global_solutions/index.py</a>'<br>
> failed<br>
> [Fri Nov 06 12:56:20 2009] [error] [client 67.96.172.81] Premature end of<br>
> script headers: index.py<br>
> [Fri Nov 06 13:52:15 2009] [error] [client 66.249.67.153] File does not<br>
> exist: /var/www/html/<a href="http://angrynates.com/robots.txt" target="_blank">angrynates.com/robots.txt</a><br>
> [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] (2)No such file<br>
>  or directory: exec of<br>
>  '/var/www/html/<a href="http://angrynates.com/global_solutions/index.py" target="_blank">angrynates.com/global_solutions/index.py</a>' failed, referer:<br>
>  <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] Premature end of<br>
> script headers: index.py, referer: <a href="http://angrynates.com/global_solutions/" target="_blank">http://angrynates.com/global_solutions/</a><br>
> [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] File does not<br>
> exist: /var/www/html/<a href="http://angrynates.com/favicon.ico" target="_blank">angrynates.com/favicon.ico</a><br>
> [Fri Nov 06 13:52:53 2009] [error] [client 208.84.198.58] File does not<br>
> exist: /var/www/html/<a href="http://angrynates.com/favicon.ico" target="_blank">angrynates.com/favicon.ico</a><br>
> [root@13gems etc]#<br>
><br>
> Please help.<br>
> Victor<br>
><br>
<br>
</div></div>Can we see the output of 'ls -lZ' and 'fixfiles check' on those directories,<br>
and see what the Apache (httpd.conf or .htaccess) configuration is for them?<br>
<br>
----<br>
<font color="#888888">Rami Chowdhury<br>
"Passion is inversely proportional to the amount of real information<br>
available." -- Benford's Law of Controversy<br>
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)<br>
</font></blockquote></div><br>