Solved

.htaccess & .htpasswd is working but user not found

Posted on 2000-03-19
4
2,189 Views
Last Modified: 2013-12-25
I tried to configure authfile on my folder
i create .htaccess, .htpasswd, configure access.conf

when i trying accessing that folder
apache said authoprize fail.

when i looking what happened, in error_log, its say

"[Mon Mar 20 10:34:23 2000] [error] [client 204.158.21.2] (13)Permission denied: Could not open password file: /home/myhome/authfiles/.htpasswd"

"[Mon Mar 20 10:34:23 2000] [error] [client 204.158.21.2] user myname not found: /secretfolder"


contents of : /home/httpd/domains/mydomain/secretfolder/.htaccess
===================================================
AuthUserFile /home/myhome/authfiles/.htpasswd
AuthGroupFile /dev/null                    
AuthName "My Secret Folder"              
AuthType Basic                              
require valid-user                          
===================================================

contents of : /home/myhome/authfiles/.htpasswd
===================================================
myname:QQv2f0YGhTpdc
hisname:Fav2f0YG3dpcc
hername:QRx2f0eGghrgc
===================================================


contents of : access.conf
===================================================
<Directory /home/httpd/domains/>      

AuthUserFile /home/myhome/authfiles/.htpasswd    
AllowOverride All                              
       
order allow,deny                                
allow from all                                  </Directory>
===================================================

any one know, what happend exactly ?

Thanks
Rizal
hrizal@royal.net

0
Comment
Question by:hrizal
  • 2
4 Comments
 
LVL 2

Author Comment

by:hrizal
Comment Utility
also i have chmod 777 to .htacess file
0
 

Expert Comment

by:fatguy
Comment Utility
My guess is that the access.conf or httpd.conf should be like:

DocumentRoot /home/httpd/domains
AccessFileName .htaccess
AllowOverride All

0
 
LVL 2

Author Comment

by:hrizal
Comment Utility
fatguy,
i was checked on mu httpd.conf and access.conf
and its was setting like thats
and its still not work ... :(

i think the problem is on access right on "/home/myhome/authfiles/.htpasswd"
its not readable by other users ..


0
 
LVL 2

Accepted Solution

by:
jonalee earned 100 total points
Comment Utility
Your setting is OK.
Just set the access mode your .htpasswd and .htaccess to 0600

All the security seeting in your home folder needs to be set as 0600, like .netrc, etc.

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now