Home: General Discussions: Internet Security:
Dir protection...



Rivotti
User

Apr 28, 2000, 4:28 AM


Views: 49307
Dir protection...

Hi everyone:

First, I have to thank you for answering my wish of a Security Forum. We're Great. Smile

Now, the facts:

What is the best way to protectect a directory? For example this directory:
www.site.com/dir

This directory should give access for those with a password.

Rivotti

P.S.- I'm working on a Apache Server


Jasmine
Administrator

May 3, 2000, 5:53 AM


Views: 49307
Re: Dir protection...

Your best bet is to use htaccess & htpasswd. htaccess is a simple text file with password-protection directives; htpasswd is a different file that stores user information.

A good place to start learning about htaccess is http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html . Though this tutorial references only Unix-based servers, it htaccess/htpasswd works just fine on most Win 32 versions as well.

Hope this helps!


Rivotti
User

May 3, 2000, 9:00 AM


Views: 49307
Re: Dir protection...

Thanks Jasmine: Smile

I'll check it out.

Rivotti


RobWilson
Deleted

Jan 26, 2001, 3:20 AM


Views: 49244
Re: Dir protection...

Stupid question from a newbie getting out of his depth:
Is it possible to password protect a directory, e.g. a scripts directory, so that nobody can access the directory to view or download scripts or logs but still allow these scripts to be called and used by any user? I've read the page you recommend on HTAcces but can't work out if this hierarchical access is possible. This is the problem with the internet, its easy for idiots like me to gain a little knowledge.... :-)



modified
Deleted

Jan 26, 2001, 6:07 PM


Views: 49242
Re: Dir protection...

You would chmod the directory itself 700. Then you could run the scripts, but couldn't get a directory listing.