Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.htaccess & .htpasswd is working but user not found

Posted on 2000-03-19
4
Medium Priority
?
2,403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

670 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