Solved

.htaccess & .htpasswd is working but user not found

Posted on 2000-03-19
4
2,264 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

808 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