|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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
|
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
RE: Apache Error 13, Permission Denied
Do you even have ruby installed?
Do a whereis ruby What do you get back? |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||
|
|||
|
RE: Apache Error 13, Permission Denied
Then change your first line to
!# /usr/bin/ruby You had #! /usr/local/ruby |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||
|
|||
|
RE: Apache Error 13, Permission Denied
In your first post you had
Quote:
Then you said whereis was /usr/bin/ruby I am confused. |
|
#9
|
||||
|
||||
|
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 |
|
#10
|
||||
|
||||
|
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 |
|
#11
|
||||
|
||||
|
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 |
|
#12
|
|||
|
|||
|
RE: Apache Error 13, Permission Denied
I don't have an answer...but I'm bumping this thread...
|
|
#13
|
|||
|
|||
|
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?
|
|
#14
|
|||
|
|||
|
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! |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Apache Error 13, Permission Denied |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|