LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-21-2006, 01:36 PM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Apache path/execution problem


Hi folks,

I have bugzilla installed, 2.22 on Debian running apache. I'm having a small problem.

Bugzilla installs to /usr/lib/cgi-bin, and my actual web root is /var/www. Bugzilla itself runs, but because the files are in /cgi-bin, it's not able to parse any .css or plain .html files - it thinks they're all scripts instead.

Here's a snippet from my logfile:

Quote:
[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/custom/global.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/custom/global.css
[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/standard/global.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/standard/global.css
[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/custom/index.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/custom/index.css
It's finding and calling them, but because they're being called from outside of the web root, apache is trying to runthem (I think) instead of just parsing them as plain .css and .html files.

Any insight on fixing this would be very much appreciated. Cheers.
 
Old 12-22-2006, 10:11 PM   #2
amocjr
Member
 
Registered: Aug 2003
Location: Connecticut
Distribution: Mandrake, Debian
Posts: 39

Rep: Reputation: 15
Oh, I just re-read your post after I posted a reply and realized I misunderstood your problem. I had thought you were having trouble executing the cgi scripts. But it appears the problem you're having is that Apache is trying to execute plain old html files as if they were scripts.

I think you're right about being outside the document root. Apache is trying to execute them because they are where Apache is expecting to see scripts.

I don't know beans about Bugzilla, but is there a configuration file for it somewhere that you can use to tell it to put the css and html files in the Apache document root directory?

Last edited by amocjr; 12-22-2006 at 10:17 PM.
 
Old 12-22-2006, 10:12 PM   #3
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
Change the location of your cgi-bin. It is in the Apache configuration file.

Alternatively, you could move all the contents of /usr/lib/cgi-bin to the cgi-bin of your Apache. Then turn /usr/lib/cgi-bin into a simlink that actually points to the Apache cgi-bin. This should enable Apache to parse these files as normal, but still allow Bugzilla to function properly, as long as it is able to follow simlinks.

~Justin
 
Old 03-28-2009, 12:53 AM   #4
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
I have the exact same problem. same error message and everything:

Code:
[Sat Mar 28 01:22:02 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Sat Mar 28 01:22:20 2009] [error] [client 74.76.90.83] (13)Permission denied: exec of '/usr/lib/cgi-bin/bugzilla/skins/standard/index/front.png' failed
I tried adding the "FollowSymLinks" to the cgi-bin directory in /etc/apache2/sites-enabled/000-default, but that didn't change anything. It also appears that skin path is mandatory and cannot be changed to point to some other non-script location.
 
Old 09-15-2009, 08:09 AM   #5
globestern
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
same problem here.. I run bugzilla under apache 2.2 and suexec..

any idea?

Last edited by globestern; 09-15-2009 at 08:22 AM.
 
Old 12-15-2009, 06:31 AM   #6
lintunen
LQ Newbie
 
Registered: Dec 2007
Location: Finland
Distribution: Ubuntu Karmic
Posts: 2

Rep: Reputation: 0
I was getting a similar error message but for a different application (TPP = Trans Proteomic Pipeline) that had its file stored outside of the Apache document root.

The solution to the problem was to add an appropriate handler to the directory directive where the CGI scripts were stored to stop specific files types being handled as scripts. For example:

<Directory "/usr/local/tpp/cgi-bin">
...
AddHandler default-handler .jpg .png .css
...
</Directory>
 
  


Reply

Tags
apache, bugzilla, cgi, cgibin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
program execution path debugger? (C++) Thinking Programming 3 02-23-2006 04:16 PM
Apache path and kde path questions darkraider Debian 1 11-12-2005 05:07 AM
Apache 2 change www path problem MDK10.2 ewan Linux - Newbie 3 05-08-2005 04:38 AM
Apache .cgi execution problems KeithKessler Linux - Software 7 12-01-2004 11:19 AM
Apache exploit leading to arbitrary execution. Fixes? prell Linux - Security 10 09-22-2004 08:54 AM


All times are GMT -5. The time now is 10:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration