I'm having some trouble with this. I believe I stored the files and changed the permissions properly, but access is still given to all. This is what I did:
Create a .htpasswd file with the generated password,
I stored this file in a directory that I will specify in a .htaccess file
I then created the .htaccess file within the protected directory.
i.e. AuthUserFile /absolutepath/.htpasswd
require user admin
Btw, I'm using UNIX, and I did chmod 644 to the .htaccess and .htpasswd files and then a chmod 711 to both directories individually(wasn't sure which one to do it to). I did them independently too, by creating a new directory and not using the one that had already permissions set.
Can anyone point out anything that I may be doing incorrectly.