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