Web Hosting Talk


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Best way to protect Web Folder Access?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)

 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-12-2008, 06:06 PM
thefandango thefandango is offline
View Beta Profile
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 84
Best way to protect Web Folder Access?

Hi

This may be a basic question so apologies. I have had a website developed a while back and have today noticed during some final work that I can access all folders on the site. For example if I type in www.mysite.com/xinha I can see all the xinha configuration files. It is the same for my javascript folder etc.

Obviously this is not good!

If I merely place an index.html into each folder while that be sufficient to block access? Or do I need to use htaccess? If so, what is the basic htaccess wording I would need to stop outside access?

Thanks.

Reply With Quote
Sponsored Links
  #2  
Old 09-12-2008, 08:41 PM
TheITAdvisory TheITAdvisory is offline
View Beta Profile
Junior Guru
 
Join Date: Mar 2008
Posts: 196
index.html will be sufficient enough unless the person knows the exact file name they want to look for, like admin.config or something. If you have an admins directory, or files ina folder you dont want anyone to access, a .htaccess is needed.

.htaccess howto: http://www.besthostratings.com/articles/htaccess.html

You can also chmod the directory

__________________
www.TheITAdvisory.com

Reply With Quote
  #3  
Old 09-12-2008, 09:25 PM
bear bear is offline
View Beta Profile
Community Leader
 
Join Date: Oct 2002
Location: In Effigy
Posts: 12,364
Just add an .htaccess file in the root directory, and in it place this: Options -Indexes

That will (depending on your server configuration) give a forbidden error if someone tries to access a folder directly that doesn't have an index file, instead of showing a list of files (index).

__________________
Did you know WHT has a help desk?

Reply With Quote
Sponsored Links
  #4  
Old 09-13-2008, 07:47 AM
thefandango thefandango is offline
View Beta Profile
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 84
thanks guys. I have bunged in some index files. I think once my site is ready for public launch I am going to need a security/admin expert to take a look over my site and server!

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement: