Solved

.htaccess & .htpasswd is working but user not found

Posted on 2000-03-19
4
2,284 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
ID: 2634720
also i have chmod 777 to .htacess file
0
 

Expert Comment

by:fatguy
ID: 2636872
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
ID: 2686504
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
ID: 2739640
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
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…

713 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