Can't access cgi-bin directory

Can't access cgi-bin directory

Post by Stev » Wed, 21 Feb 2001 03:39:01



I am running Apache 1.3 on rh 5.2.  Whenever I try to display the
cgi-bin directory or execute one of the scripts within the directory
(through the server), I get the 'access forbidden' error.

I don't have a problem accessing any of the other directories or their
files.

There was a time when I could access and execute the scripts in
cgi-bin.  Something obviously changed, but I can't figure out what.

My directory structure is

/home/httpd
/home/httpd/cgi-bin
/home/httpd/testweb

srm.conf
DocumentRoot /home/httpd
AccessFileName .htaccess
ScriptAlias /cgi-bin/ home/httpd/cgi-bin

I don't have any .htaccess (or equivalent) file in any directories

access.conf
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /home/httpd>
Options Indexes Includes FollowSymLinks
AllowOverride None
order allow,deny
allow from all
</Directory>
<Directory /home/httpd/cgi-bin>
order allow,deny
AllowOverride None
Options ExecCGI
</Directory>

Thanks for the help

 
 
 

Can't access cgi-bin directory

Post by Justin Kell » Wed, 21 Feb 2001 04:07:32



> I am running Apache 1.3 on rh 5.2.  Whenever I try to display the
> cgi-bin directory or execute one of the scripts within the directory
> (through the server), I get the 'access forbidden' error.

> I don't have a problem accessing any of the other directories or their
> files.

> There was a time when I could access and execute the scripts in
> cgi-bin.  Something obviously changed, but I can't figure out what.

> My directory structure is

> /home/httpd
> /home/httpd/cgi-bin
> /home/httpd/testweb

> srm.conf
> DocumentRoot /home/httpd
> AccessFileName .htaccess
> ScriptAlias /cgi-bin/ home/httpd/cgi-bin

> I don't have any .htaccess (or equivalent) file in any directories

> access.conf
> <Directory />
> Options None
> AllowOverride None
> </Directory>
> <Directory /home/httpd>
> Options Indexes Includes FollowSymLinks
> AllowOverride None
> order allow,deny
> allow from all
> </Directory>
> <Directory /home/httpd/cgi-bin>
> order allow,deny
> AllowOverride None
> Options ExecCGI
> </Directory>

> Thanks for the help

I have the same problem, and have not been able to display the directory,
permissions seem to have nothing to do with it either as far as I can
tell. However this does not prevent me from executing cgi files, for
example I have gottem the wwwboard cgi to work on my website. You
'should' have no problem with it. If it is a cgi file that you need to
directly access try typing in http://yourhost/cgi-bin/yourscript.cgi

I hope this helps. . .

-Justin Kelly

 
 
 

Can't access cgi-bin directory

Post by Stev » Wed, 21 Feb 2001 04:16:32


I can't execute a script either from an html page or by directly accessing it
as you suggested (http://yourhost/cgi-bin/yourscript.cgi)


> > I am running Apache 1.3 on rh 5.2.  Whenever I try to display the
> > cgi-bin directory or execute one of the scripts within the directory
> > (through the server), I get the 'access forbidden' error.

> > I don't have a problem accessing any of the other directories or their
> > files.

> > There was a time when I could access and execute the scripts in
> > cgi-bin.  Something obviously changed, but I can't figure out what.

> > My directory structure is

> > /home/httpd
> > /home/httpd/cgi-bin
> > /home/httpd/testweb

> > srm.conf
> > DocumentRoot /home/httpd
> > AccessFileName .htaccess
> > ScriptAlias /cgi-bin/ home/httpd/cgi-bin

> > I don't have any .htaccess (or equivalent) file in any directories

> > access.conf
> > <Directory />
> > Options None
> > AllowOverride None
> > </Directory>
> > <Directory /home/httpd>
> > Options Indexes Includes FollowSymLinks
> > AllowOverride None
> > order allow,deny
> > allow from all
> > </Directory>
> > <Directory /home/httpd/cgi-bin>
> > order allow,deny
> > AllowOverride None
> > Options ExecCGI
> > </Directory>

> > Thanks for the help

> I have the same problem, and have not been able to display the directory,
> permissions seem to have nothing to do with it either as far as I can
> tell. However this does not prevent me from executing cgi files, for
> example I have gottem the wwwboard cgi to work on my website. You
> 'should' have no problem with it. If it is a cgi file that you need to
> directly access try typing in http://yourhost/cgi-bin/yourscript.cgi

> I hope this helps. . .

> -Justin Kelly

 
 
 

Can't access cgi-bin directory

Post by Rodrigo Henrique » Wed, 21 Feb 2001 03:54:23


You need ScriptAlias...


> I am running Apache 1.3 on rh 5.2.  Whenever I try to display the
> cgi-bin directory or execute one of the scripts within the directory
> (through the server), I get the 'access forbidden' error.
> I don't have a problem accessing any of the other directories or their
> files.
> There was a time when I could access and execute the scripts in
> cgi-bin.  Something obviously changed, but I can't figure out what.
> My directory structure is
> /home/httpd
> /home/httpd/cgi-bin
> /home/httpd/testweb
> srm.conf
> DocumentRoot /home/httpd
> AccessFileName .htaccess
> ScriptAlias /cgi-bin/ home/httpd/cgi-bin
> I don't have any .htaccess (or equivalent) file in any directories
> access.conf
> <Directory />
> Options None
> AllowOverride None
> </Directory>
> <Directory /home/httpd>
> Options Indexes Includes FollowSymLinks
> AllowOverride None
> order allow,deny
> allow from all
> </Directory>
> <Directory /home/httpd/cgi-bin>
> order allow,deny
> AllowOverride None
> Options ExecCGI
> </Directory>
> Thanks for the help

--
Rodrigo Henriquez M.      | Red wine and sleeping pills

ICQ: 67102514             | Cheap sex and sad films
http://nn.cl/~rhenriqu    | Help me get back where I belong
 
 
 

Can't access cgi-bin directory

Post by Justin Kell » Wed, 21 Feb 2001 04:34:23



> I can't execute a script either from an html page or by directly accessing it
> as you suggested (http://yourhost/cgi-bin/yourscript.cgi)

Well, you may have already checked this, but what I did was make sure all
scripts were 755, and were in my actual script directory, not the one that
apache  defaultly aliases. (for example: /home/httpd/cgi-bin/ is an aliase to
/usr/local/apache/cgi-bin/   make sure they would be in the latter) Make sure
permissions are set correctly on both cgi-bin directories(try 755, this may be
overkill I don't know enough to say, all I know is that it works on mine). . .
Also try changing ownerships to 'nobody' for the cgi scripts and cgi-bin
directories.

-Justin Kelly

 
 
 

Can't access cgi-bin directory

Post by Mark Tayl » Wed, 21 Feb 2001 11:17:21




Quote:

>I am running Apache 1.3 on rh 5.2.  Whenever I try to display the
>cgi-bin directory or execute one of the scripts within the directory
>(through the server), I get the 'access forbidden' error.

>I don't have a problem accessing any of the other directories or their
>files.

>There was a time when I could access and execute the scripts in
>cgi-bin.  Something obviously changed, but I can't figure out what.

>My directory structure is

>/home/httpd
>/home/httpd/cgi-bin
>/home/httpd/testweb

>srm.conf
>DocumentRoot /home/httpd
>AccessFileName .htaccess
>ScriptAlias /cgi-bin/ home/httpd/cgi-bin

>I don't have any .htaccess (or equivalent) file in any directories

>access.conf
><Directory />
>Options None
>AllowOverride None
></Directory>
><Directory /home/httpd>
>Options Indexes Includes FollowSymLinks
>AllowOverride None
>order allow,deny
>allow from all
></Directory>
><Directory /home/httpd/cgi-bin>
>order allow,deny
>AllowOverride None
>Options ExecCGI
></Directory>

>Thanks for the help

Steve,

If DocumentRoot is /home/httpd then there is no reason to have an alias.
You can access the cgi-bin by simply http://yourdomain.com/cgi-bin/....

Now, if your directory structure was thus..

/home/httpd
/home/httpd/cgi-bin
/home/httpd/html

And the DocumentRoot was /home/httpd/html then the alias would be
necessary. The ScriptAlias would be /cgi-bin/ /home/httpd/cgi-bin

It looks like you need the leading / on your ScriptAlias. It might work
that way. Try putting a simple html file in the cgi-bin and browse to it
with http://yourdomain.com/cgi-bin/whatever.html  and see if you can see
it. If not then your alias is definately causing the trouble. Remove it,
restart apache, and try again. Don't forget to check out the http error log
for a message that a file does not exist. That will tell you exactly where
the server was looking for your file.

Mark

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

Can't access cgi-bin directory

Post by Dean Thompso » Wed, 21 Feb 2001 15:50:06


Hi Steve,

  Just out of interest, what does the error log report when you try to execute
one of the cgi-bin scripts.  Additionally, have you added the cgi-handler ?

See ya

Dean Thompson

--
+______________________________+____________________________________________+

|   Bach. Computing (Hons)     | ICQ     - 45191180                         |
|   PhD Student                | Office  - <Off-Campus>                     |
|   School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
|   MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
|   Melbourne, Australia       |                                            |
+------------------------------+--------------------------------------------+

 
 
 

1. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

I've been seeing a number of attacks of this sort recently
from various sites in the http logs.  The time correlation
between the logs on various hosts suggests that the attacker
was scanning sequentially upward in IP addresses.  Since all
tcp and udp packets to ports below 1024 except for http,
smtp, and ident are filtered out for most, including the
attacking, sites, I'm not seeing anything else in the logs.

209.61.73.47 - - [04/Jul/1998:07:19:27 -0500] "GET /cgi-bin/phf" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/test-cgi" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/handler" 404 -

Is this a signature of some known attackware?  If so, what
other attacks accompany these http probes?

--

2. 2.5.40 s390 (3/27): drivers.

3. Can't get CGI to run in local cgi-bin directory

4. Large number of httpd processes

5. Aliasing cgi-bin directory to CGI directory

6. hard disk speed

7. No permission to access cgi-bin directory

8. Troyan horse discoverd!

9. Apache: Deny access to cgi-bin directory?

10. Trouble accessing files and directories under cgi-bin

11. trouble accessing graphics from within cgi-bin directory

12. Q: user's own cgi-bin directory?

13. cgi-bin/view-source?cgi-bin/view-source