"Michael Forster" <admin DeleteThis @muckworld.com> wrote in message
news:3f40502a$1@news.userve.net...
>
> "Alwin" <alwin DeleteThis @vhl.tudelft.nl> wrote in message
> news:bhp5oh$d6l$1@news.tudelft.nl...
> > Hi all,
> >
> > First of all, sorry for the long story, but I hope it will make my
problem
> > clear and leaves as little questions unanswered as possible.
> >
> > I'm experiencing a problem with .htaccess that seems to be quite common.
> > Unfortunately, after spending hours of searching, I haven't been able
to
> > find a proper solution yet.
> >
> > My goal: I want to password-protect just one directory on my server,
using
> > .htaccess and .htpasswd
> > The problem: Every time I visit the directory, a login-box appears and
> after
> > trying to login for three times, I get an "Authorization Required" error
> > message.
> >
> > In my httpd.conf I've got the line:
> > AllowOverride All
> > and:
> > AccessFileName .htaccess
> >
> >
> > This is the the entire content of my .htaccess file:
> > --
> > AuthUserFile /root/.htpasswd
> > AuthGroupFile /dev/null
> > AuthName "Enter password"
> > AuthType Basic
> >
> > require valid-user
> > --
> >
> > And this is how my .htpasswd file looks like:
> > --
> > alwin:<bunch of characters>
> > --
> I have just had this problem and thanks to help from this group I found
the
> answer
>
> First check your Error log - if you have an error message like
> [Fri Aug 15 05:56:31 2003] [error] [client 10.69.70.202] guest: not a
valid
> FDN:
>
> Then you might find that this is caused by either mod_auth_ldap or
> mod_auth_nds
>
> If you are running SuSE linux then it will be in the
> /etc/httpd/suse_addmodule.conf and suse_loadmodule.conf
>
> also at the start of the .htaccess file you need to add the followiing
line
> AuthAuthoritative on
>
> Hope this helps
>
> Mike.
>
>
Thx for the suggestion, Mike. Your solution didn't work, but mentioning the
error log helped
Stupid as I have been, I never checked the error logs. After I did so, I
found the following lines:
[Mon Aug 18 23:44:29 2003] [error] [client x.x.x.x] (13)Permission denied:
Could not open password file: /root/.htpasswd
[Mon Aug 18 23:44:29 2003] [error] [client x.x.x.x] user alwin not found:
/test1
It turned out that not only the permissions of the .htpasswd file had to be
something like 755, but also the permissions of the directory in which the
file is stored. I moved the .htpasswd file to /var/www/ and gave both the
directory as the file 755 permissions, changed the path in my .htaccess and
problem solved!<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: .htaccess problem