Gossamer Forum
Home : Products : Links 2.0 : Customization :

Password-Protecting a Directory???

Quote Reply
Password-Protecting a Directory???
I'm pretty new to perl/cgi, but was able to get links setup completely on my site, but I don't have a clue what I need to do to password protect the admin directory. Can anyone gimme a hand???
Quote Reply
Re: Password-Protecting a Directory??? In reply to
If you can use .htaccess and .htpasswd on your web server, this is the most secure method. You can contact your Internet Service Provider for information about setting up .htaccess/.htpasswd.

If you cannot use .htaccess, there is a password protection script located in the Resource Center.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Password-Protecting a Directory??? In reply to
Hi Eliot,


My provider does have it but it does not work and was wondering if you'd llok at this set up to shed some light if possible.

They figure where the cgi-bin is already protected that maybe the files wont work?

.htaccess
----------
AuthUserFile /usr/local/www/htdocs/somebody/cgi-bin/.htpasswd
AuthName "admin"
AuthType Basic
<Limit GET,POST,PUT>
Require valid-user
</Limit>
------------------------------------------
.htpasswd
-------------
(username:password)
------------------------------------------
Does this look like a correct set up using two text files within the cgi-bin?
Quote Reply
Re: Password-Protecting a Directory??? In reply to
pretty much.. but you have to encrypt the passwords
Quote Reply
Re: Password-Protecting a Directory??? In reply to
I don't know who your ISP, but mine has a nice tutorial about setting up .htaccess for Apache 1.2.4.

You can take a look at their tutorial, which is located at:

http://faq.web2010.com/htaccess.htm

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Password-Protecting a Directory??? In reply to
Thanks, widget: but they have an online system that encrypts and so I'm still dumbfound? There system actually issued me the password based on what I selected and it's this most confusing number that starts with (c).


Since the folder is in my cgi-bin, I am begging to wonder if it has anything to do with the "cgiwrap"?, that i enjoy dealing with.

Thanks Elliot for the web guide, but they don'y use telnet they offer ftp and web, i guess.

:-(

? Anybody?

Thanks for responding guys.
Quote Reply
Re: Password-Protecting a Directory??? In reply to
gerardo,

You could always download the Gossamer Threads FileMan script and use it to create the password protected directories for you.

Also, do a search for "htpasswd" and a number of messages concerning it will come up. Perhaps one of them will help.

I hope this helps.
Quote Reply
Re: Password-Protecting a Directory??? In reply to
Most hosts tell people that they can't use .htaccess files because unless you modify the servers access.conf file to only look for the .htaccess file in the directory it is actually in it will look for it in every directory from root to the directory it is in and slow the server down.
Quote Reply
Re: Password-Protecting a Directory??? In reply to
 
Quote:
Most hosts tell people that they can't use .htaccess files because unless you modify the servers access.conf file to only look for the .htaccess file in the directory it is actually in it will look for it in every directory from root to the directory it is in and slow the server down.

That is the <ROOT> .htaccess file...but most ISPs do allow people to write .htaccess files in directories and sub-directories.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.