Solved

Apache on Linux .htaccess file configuration error message

Posted on 2010-11-15
8
737 Views
Last Modified: 2012-05-10
Apache is hosted on CentOS5.5 server.  There needs to be password protected stuff in the /services/apache/htdocs/TOOLS directory.  Basic information is provided under.  It so appears that the .htpasswd file is not being read properly.  Apache does have read access to the .htpasswd file.  

Could you tell me what appears to be the source of problem?

ERROR MESSAGE:
[Mon Nov 15 11:40:32 2010] [crit] [client 10.25.3.34] configuration error:  couldn't check access.  No groups file?: /TOOLS/
<Directory "/services/apache/htdocs">

RELATED CONFIG in httpd.conf FILE
    #Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

LOCATION AND PERMISSION OF THE REQUIRED FILES
-rw-r--r-- 1 root apache 157 Nov 15 11:14 /services/www/htdocs/TOOLS/.htaccess
-rw-r--r-- 1 root apache  18 Nov 15 11:00 /services/www/htdocs/TOOLS/.htpasswd

CONTENTS OF .htaccess FILE
AuthName "Access is Denied. Enter password"
AuthType Basic
AuthUserFile /services/apache/htdocs/TOOLS/.htpasswd
<Limit GET POST>
Require valid-user
</Limit>
0
Comment
Question by:farzanj
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Expert Comment

by:max-hb
ID: 34138149
Typo in your .htaccess?!
AuthUserFile /services/apache/htdocs/TOOLS/.htpasswd
vs.
AuthUserFile /services/www/htdocs/TOOLS/.htpasswd
0
 
LVL 31

Author Comment

by:farzanj
ID: 34138700
That was a nice catch.  But still the error persists.  Exactly the same.

CONTENTS OF FILE: /services/www/htdocs/TOOLS/.htaccess
AuthName "Access is Denied. Enter password"
AuthType Basic
AuthUserFile /services/www/htdocs/TOOLS/.htpasswd
<Limit GET POST>
Require valid-user
</Limit>

RELATED httpd.conf FILE:
<Directory "/services/www/htdocs/TOOLS">
      AllowOverride AuthConfig
</Directory>
0
 
LVL 3

Expert Comment

by:Prograministrator
ID: 34138753
check the path,

you typed two different paths in your question.

/services/apache/htdocs/TOOLS/.htpasswd

/services/www/htdocs/TOOLS/.htpasswd

if the folder name is "www" change the path in your htaccess file and httpd.conf (<Directory "/services/apache/htdocs">)
0
 
LVL 4

Accepted Solution

by:
max-hb earned 350 total points
ID: 34138830
Have you installed the neccessary apache modules? You should need:
mod_auth_basic
mod_authn_file
mod_authz_user

You can check if these modules are installed by creating a file phpinfo.php on your web server with the following content:

<?php
phpinfo();
?>

Open that file in your web browser and look at the section called "Loaded modules".
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Assisted Solution

by:Prograministrator
Prograministrator earned 150 total points
ID: 34138849
Sorry,
I did not notice for your last comment.

Check the required modules is loaded well,

means check this three lines in your httpd.conf :

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_user_module modules/mod_authz_user.so
0
 
LVL 31

Author Comment

by:farzanj
ID: 34139473
Thank you.  This fixed the problem.

I kind of knew that one of the modules was missing but I didn't know which one.

So the question becomes this:
Is there some Apache documentation of a way to query which functionality is obtained by which modules?

Functionality ---> Modules list
0
 
LVL 4

Expert Comment

by:max-hb
ID: 34139546
At http://httpd.apache.org/docs/2.0/en/mod/ you'll find a extensive list of apache modules organized by categories.
0
 
LVL 31

Author Closing Comment

by:farzanj
ID: 34144647
Thank you guys.  The last comment did not completely answer my question.  May be this is it but I wanted to know better place where it would map major Apache functionalities with modules.  May be there isn't one but please post it if you find one.

I appreciate your help.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This article discusses four methods for overlaying images in a container on a web page
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

10 Experts available now in Live!

Get 1:1 Help Now