403 Forbidden / show directories


 
Thread Tools Search this Thread
Top Forums Web Development 403 Forbidden / show directories
# 1  
Old 01-23-2010
403 Forbidden / show directories

I have a directory that I want to just list the items when going to the URL instead of having an index.html page in the folder. I keep getting a 403 forbidden even though it is in my document root.

I tried to add:

Code:
Alias /keys/ "/var/www/html/keys/"

<Directory "/var/www/html/keys">
    Options Indexes MultiViews FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

but its still not working

what am i missing?
# 2  
Old 01-23-2010
The 2 obvious questions first:
  1. Did you reload the apache configuration after you changed it?
  2. Does the user apache is running as have access to the directory you specified?
# 3  
Old 01-23-2010
yes and yes

I can get to all other directories and files on my server, just not this one, and the permissions are the same


Code:
/var/www/html> ls -lA
drwxr-xr-x   9 root  root   4096 2010-01-23 12:03 keys
drwxr-xr-x   2 root  root   4096 2009-11-10 19:47 resume

document root above.
resume folder works
keys gets 403
# 4  
Old 01-23-2010
Hi.

I can't recreate your issue.

Is there perhaps a .htaccess file in the keys directory, which is not readable?
# 5  
Old 01-23-2010
Quote:
Originally Posted by scottn
Hi.

I can't recreate your issue.

Is there perhaps a .htaccess file in the keys directory, which is not readable?
no just the directories of what i want displayed
# 6  
Old 01-23-2010
That's odd.

I created a .htaccess file with rubbish, and got an internal server error.

Then I chmod'd the file to 400 and got forbidden, then deleted it and still got forbidden.

After restarting the webserver, it works OK again.

What does the error_log say?

Last edited by Scott; 01-23-2010 at 03:20 PM..
# 7  
Old 01-23-2010
fixed

I had to comment out a line in:

Code:
modsecurity.d/modsecurity_crs_50_outbound.conf

Code:
     52 # Directory Listing
     53 #SecRule RESPONSE_BODY "(?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>\[To Parent Directory\]<\/[Aa]><br>)" \
     54 #        "phase:4,t:none,ctl:auditLogParts=+E,deny,log,auditlog,status:403,msg:'Directory Listing',id:'970013',tag:'LEAKAGE/INFO',severity:'4'"
     55

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Tip: show the last 3 directories in the shell prompt

tcsh: have the following in .cshrc (or .tcshrc) set prompt=": " zsh: have the following in .zshrc PS1="%# " bash: have the following in .bashrc PS1='\$ 'Lacking direct support this is a good approximation. (0 Replies)
Discussion started by: MadeInGermany
0 Replies

2. Red Hat

Apache Tomcat(403 Access Denied)

Good evening, i've got a problem. I fail to enter "Manager App" in Apache Tomcat/9.0.0.M9 on server, it says "403 Access Denied». for example, server address is 192.168.1.4, when I type 'localhost ' in the browser and press "Manager App", then everything is ok. but if I enter 192.168.1.4 and press... (0 Replies)
Discussion started by: v.k.l.chr.by
0 Replies

3. Shell Programming and Scripting

Wget-403-Forbidden-Error

Hi Friends, I did an extensive search over the internet and tried all possible solutions that were recommended, but couldn't figure this out. Please see this link http://www.dli.gov.in/data6/upload/0159/808/PTIFF/00000007.tif It works. But, when I try the following command wget -r... (7 Replies)
Discussion started by: jacobs.smith
7 Replies

4. Web Development

Php localhost/ directories show ?? ICONS

I have been troubleshooting a couple of problems all day that have to do with this all day. I do not know if you need to know the code I used in php but if you do I will post it. I hope that you can see the .pngs. Thanks ahead of time. Using phpMyAdmin and creating files.... somehow... (2 Replies)
Discussion started by: iHaveAQuestion
2 Replies

5. UNIX for Dummies Questions & Answers

Script to if webpage is: forbidden, Error...

I have a file with about 29,000 website names. I would like to find a script that would test if each website name is current/active or not. If not it should check if the page is: Forbidden, 404 Error... (1 Reply)
Discussion started by: dcovnton
1 Replies

6. UNIX for Dummies Questions & Answers

show all text files in directories and subdirectories

Hi! I am trying to find all text files in my home directory that contain the string "C-d" so I tyied this : cd ~ find . -type f -exec grep -l "C-d" {} + but it took very long so I tryed this : ls -aR | xargs file |grep text but it didn't descend in the directories and it said :... (3 Replies)
Discussion started by: kelamahim
3 Replies

7. UNIX for Dummies Questions & Answers

Shell Scripts - Show all directories with full information ( and no files)

Hello all, i'm stumped.... I need to list all directories with all there info and exclude the files, then vice versa. I am not sure if I need to string several ls commands together or how to even do that. I believe I need to do some variation of ls -l but need to figure out how to take out the... (5 Replies)
Discussion started by: citizencro
5 Replies

8. Shell Programming and Scripting

Wget-Forbidden error

Hi , I am using shell script to connect to a https site and download all the files in a directory. eg: wget --no-check-certificate -r -np --user=<username> --password=<passwd> -O temp.txt https:<website>/<dirname> Error : HTTP request sent, awaiting response... 403 Forbidden 07:40:20... (0 Replies)
Discussion started by: mohanpadamata
0 Replies

9. Linux

Apache Forbidden Error

When i go to my browser and type both localhost or the ip, i get Forbidden, you do not have permission to access / on this machine Whys that ? (1 Reply)
Discussion started by: perleo
1 Replies

10. UNIX for Advanced & Expert Users

403 Error in Apache?

I have installed Apache lots of times before. I have recently installed apache on FreeBSD. And it gives me all the time 403 Frobidden - you don't have permittion to access / directory. I have checked permitions. I've got -rwxrwxr-x for for all Apache DocumentRoot. I've checked Files directive in... (6 Replies)
Discussion started by: solvman
6 Replies
Login or Register to Ask a Question