You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Anthony Howe <ac...@snert.com> on 1999/04/09 10:37:48 UTC

config/4215: Better protection

>Number:         4215
>Category:       config
>Synopsis:       Better protection
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Fri Apr  9 01:40:01 PDT 1999
>Last-Modified:
>Originator:     achowe@snert.com
>Organization:
apache
>Release:        1.3.4
>Environment:
Linux athena.alcyonis.fr 2.0.35 #18 Fri Sep 4 16:19:31 GMT 1998 i586 unknown
>Description:
In recent editions of the httpd.conf files, these lines appear in order 
to protect .htaccess files from being viewed.

<Files .htaccess>
    Order allow,deny 
    Deny from all
</Files>

Typically a .htaccess file is created with the path to a "users" and/or "groups"
files.  Since WebMasters are lazy, they tend to leave these files in the same
directory as the .htaccess file, such that a malcontent could possibly guess
this file name and harvest it.

>How-To-Repeat:

>Fix:
As a preventative measure, I recommend that following be added to the default
Apache httpd.conf in order to protect ALL hidden files (under a Unix system).
All a webmaster has to then to protect special data files is rename them as a
dot file, for example :  "users" and "groups" files as ".users" and ".groups".  This also has the added benefit that
a webmaster using a dot file probably doesn't want the public looking at them.

# Dot files should stay hidden.
<FilesMatch "^\.">
    Order allow,deny
    Deny from all 
</FilesMatch>
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]