.htaccess password protect dirs

Ok, at the risk of sounding like a thickie (because it seems pretty straight forward) - I can’t get this to work.

I have followed the links at https://panel.dreamhost.com/kbase/index.cgi?area=834 but when I try to access a script in the dir in question, rather than prompting me for a userid/pw as expected, I just get 404 Forbidden.

My .htaccess file is:

AuthType Basic
AuthUserFile /home/<shell_user>/pass
AuthName "Members Area"
require valid-user

My ~/pass file seems valid too as far as I can tell.

I’m sure it is a noob question - but can anyone help me? Could it be to do with permissions of the pass or .htaccess files? (I assume they should be 644?) The actual script I am trying to call is 755. (Should that be world readable? Or just world executable?)

Thanks, Zilch

Hi adrco,

Good point…looks like it was the directory permissions. I chmod’ed to 755, and it works! It was 744…strange, I had the idea that everything run as owner on Dreamhost, but I guess not.

Thanks for your help! Now to figure out how to get Perl to work with htaccess files.