Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an HTACCESS as follows:

AuthUserFile /home/nasht00/.htmydomain
AuthName "EnterPassword"
AuthType Basic
Require valid-user

When I try it, the password pop-up appears. Whatever I enter in it, I get a 500 Internal Server Error.

My password file is under /home/nasht00/.htmydomain . Its owner is nasht00:www-data (nasht00 is my user, www-data is the group that apache2 belongs to). File permissions on that file is 775.

What am I missing?

If I try without the htaccess it works fine of course.

I have Ubuntu 9.10 with apache2.

share|improve this question
1  
The error log says...? –  Ignacio Vazquez-Abrams Apr 16 '10 at 1:52
    
ahh .... Permission denied: Could not open password file: /home/nasht00/.htmydomain –  nute Apr 16 '10 at 2:08
    
what user/group should it be then?? –  nute Apr 16 '10 at 2:09

2 Answers 2

up vote 2 down vote accepted

The user or group httpd is running as needs read access to the directories leading to the file in order to be able to get to it.

share|improve this answer

Ok, got it, I'm not sure why but it works if I put my password file under "/var/www/". I kept the same user/group and permissions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.