Forbidden

NickRac

Verified User
Joined
May 24, 2003
Messages
22
Location
Connecticut
How do I allow access to a directory? I CHMOD'd the directory to 777 w/ no luck, I just want users to be able to open the directory and cruise through the files w/o getting the Forbidden message.
 
Hi NickRac,

To do this, you must edit your

/etc/httpd/conf/httpd.conf

file at line 460 to 463 and add a # in front of each of those lines.

you should see:

#<Directory />
# Options FollowSymLinks
# AllowOverride All
#</Directory>

when you are done, restart the webserver and you'll be able to see the files inside a directory.

And reset the directorys to 755, as 777 means that anyone on the server can write to that user's directory.

John
 
Wouldn't putting an .htaccess in the directory with the contents of:

Options +indexes

Have done it a little bit better? Assuming that overrides were already one and allowed .htaccess..

Might not want to allow directory listing for the entire server...
 
Yes,

Thanks ProHacker, that's a more secure solution but would require adding the .htaccess file into each directory you wich to have readable. I guess it depends on what you want...

I'd recommend prohackers way, but if you want that feature to be global to all accounts and directories without having to add the .htaccess file to each, my solution will accomplish this. There are probably other ways to modify the <Directory /> directive to make it work, but this seems to work fine.

John
 
Back
Top