Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 16th, 2003, 01:55 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
Apache Error 13, Permission Denied

I have Apache 1.3.27 installed on a Mandrake Linux box.

I'm attempting to execute a CGI script and I receive a error 500 message.

The error logs say:

[Tue Jul 15 18:14:35 2003] [error] (13)Permission denied: exec of /web/cdd/cgi-bin/test.cgi failed
[Tue Jul 15 18:14:35 2003] [error] [client 24.169.88.243] Premature end of script headers: /web/cdd/cgi-bin/test.cgi

First two lines of the CGI are:
#! /usr/local/ruby
puts "Content-Type: text/htmlnn"

Both the directory and the file's permissions are 755.

I can't figure it out. Any ideas?

Thanks.

-Tim

Reply With Quote
  #2  
Old July 16th, 2003, 01:59 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to postalcow
RE: Apache Error 13, Permission Denied

Do you have a ScriptAlias to that directory? If you don't know what I am talking about let me know I will tell you how to fix your httpd.conf file

Reply With Quote
  #3  
Old July 16th, 2003, 02:20 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

Unfortunately, I checked that also.

ScriptAlias /cgi-bin/ "/web/cdd/cgi-bin"
<Directory "/web/cdd/cgi-bin">
Options ExecCGI
</Directory>

I even tried commenting out all my ScriptAlias lines and making everything +ExecCGI, and eitherway it's still the same results.

-Tim

Reply With Quote
  #4  
Old July 16th, 2003, 09:59 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to postalcow
RE: Apache Error 13, Permission Denied

Do you even have ruby installed?

Do a

whereis ruby

What do you get back?

Reply With Quote
  #5  
Old July 16th, 2003, 08:54 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

Yes...
[root@www]# whereis ruby
ruby: /usr/bin/ruby

And I do appologize, in my first post I said the first line of the CGI is #! /usr/local/ruby... That was a typo on my part. The first line of the CGI script is really pointing to the correct location, /usr/bin/ruby.

Perhaps a module is not loaded correctly?

-Tim


Reply With Quote
  #6  
Old July 17th, 2003, 12:16 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to postalcow
RE: Apache Error 13, Permission Denied

Then change your first line to

!# /usr/bin/ruby

You had #! /usr/local/ruby

Reply With Quote
  #7  
Old July 17th, 2003, 01:20 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

no... the first line of the CGI script should be #!. It's known as the sh'bang line (Hash[#], Bang[!]). And it is pointing to the correct location for the ruby interpretor /usr/bin/ruby

Perhaps I should just rm everything and reinstall? Maybe it's a fluke thing. I've never run into this problem before. Usually just the chmod +x works.

-Tim

Reply With Quote
  #8  
Old July 17th, 2003, 01:41 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to postalcow
RE: Apache Error 13, Permission Denied

In your first post you had
Quote:
First two lines of the CGI are:
#! /usr/local/ruby
puts "Content-Type: text/htmlnn"


Then you said whereis was /usr/bin/ruby

I am confused.

Reply With Quote
  #9  
Old July 19th, 2003, 07:01 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

Sorry for the confusion; I noticed my type-o (see my 3rd messge).

whereis ruby returns /usr/bin/ruby.

the first line of my cgi-script is #! /usr/bin/ruby

I have set my cgi as executable with chmod +x test.cgi

I do not make use of ScriptAliasing in Apache's config file.

I'm going to reinstall Apache. I'm hoping this is just a fluke or misconfiguration during compile.

-Tim

Reply With Quote
  #10  
Old July 20th, 2003, 03:12 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

Sigh. Unfortunately, it's still not working. But I did have an idea.

Linux is running in "secure" mode, would that have anything to do with it?

-Tim

Reply With Quote
  #11  
Old July 20th, 2003, 03:52 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Apache Error 13, Permission Denied

I may be on to something...

CGI scripts will run in directories owned only by root.

# chown webusr /web/cgi-bin
The script won't run

# chown root /web/cgi-bin
The script runs fine.

So where do I go to fix that 'glitch'?

-Tim

Reply With Quote
  #12  
Old July 29th, 2003, 01:35 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: Apache Error 13, Permission Denied

I don't have an answer...but I'm bumping this thread...

Reply With Quote
  #13  
Old July 29th, 2003, 02:07 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to postalcow
RE: Apache Error 13, Permission Denied

Who owns the script now? Who owns the directory it is in? Just for testing did you try to 777 the script?

Reply With Quote
  #14  
Old August 5th, 2003, 12:08 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: Apache Error 13, Permission Denied

Thread moved to a resolved status.

Original poster: if you still need assistance, please answer the queries and move the thread back to unresolved. thanks!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Apache Error 13, Permission Denied


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek