Frequently Asked Questions

How do I password protect folders in my webspace ?

You can password protect your directories within your webspace by making 2 small text files.
Firstly which directory do you want to password protect?

It is not a good idea to password protect your main folder i.e: htdocs as people that get the login wrong will no doubt never return to your site.Open a new text document and enter the following...

AuthUserFile /share/isp/force9/www/uu/username/htdocs/path/.htpasswd
AuthName "Please Log On"
AuthType Basic
require valid-user
The part you need to change is the uu, username and the path replace the uu with the first two letters of your username, replace the username with your full username and replace the path with the name of the folder you wish to protect. If your username was for instance hotdog and you wanted to protect a folder called stuff the line would look like this...

AuthUserFile /share/isp/force9/www/ho/hotdog/htdocs/stuff/.htpasswd
Save the text file as htaccess.txt

When someone enters a username and password to enter this folder our unix server breaks down the password they enter and check it against an encrypted version, follow the link below to get your encrypted version...
http://www.earthlink.net/cgi-bin/pwgenerator.pl or
http://206.250.94.20/cgi/pwgenerator.pl
Once at one of these sites, type in the password you wish to use.
You will see that the end result looks like garbled text but this is the part you need.
letmein converts to 7kYNSQujPc.zc
Once you have the desired password/s you then need to paste this next to the usernames you wish to use
james:7kYNSQujPc.zc
If you wish to add more people to the access list simply add the usernames and
encrypted password

james:7kYNSQujPc.zc
john:7kYNSQujPc.zc

james and john are both using the same password of letmein but they can have different passwords if you wish.
Save this text as htpasswd.txt

All we need to do now it to upload the files and make some small changes to them .
FTP into your webspace and into the directory you wish to protect (stuff)
Upload both files into the stuff folder, we now need to change the file attributes (or ch mods)of the htaccess.txt file
Right click on it and select Change File Attributes, we need to make this file owner read and execute and group and public read only or 744
Once you have done this we need to rename both files as follows...
htaccess.txt change to .htaccess (Important note the .)
htpasswd.txt change to .htpasswd (again note the .)
The files will now seem to disappear, this is fine it is just hiding the files.
That is it! You should be able to test out the files by trying to access the folder through your browser, if you are having problems and it will not let you in make sure you are entering the correct username and password in normal form i.e: not encrypted. If you still have problems try checking the username and password on the files still on your computer then re upload and follow the steps above.