You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/03/16 16:52:32 UTC
DO NOT REPLY [Bug 41867] New: - Matches Files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41867
Summary: <DirectoryMatch> Matches Files
Product: Apache httpd-2
Version: 2.2.4
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: bugs@httpd.apache.org
ReportedBy: imacat@mail.imacat.idv.tw
Hi. This is imacat from Taiwan. I'm using the newest Apache 2.2.4. I
found that <DirectoryMatch> matches not only directories, but also files. The
attached is a small piece of terminal log showing that <DirectoryMatch> matches
partial part of the path, but not the directories.
Pleas tell me if I can be of any help, or if you need any more information.
Thank you.
======================
imacat@rinse ~ % ls -l /tmp/apache/htdocs
total 8
drwxr-xr-x 2 imacat users 4096 Mar 16 23:44 private
-rw-r--r-- 1 imacat users 40 Mar 16 23:40 privatedetective.txt
imacat@rinse ~ % cat /tmp/apache/htdocs/privatedetective.txt
Sherlock Holmes is a private detective.
imacat@rinse ~ % cat /tmp/apache/httpd.conf
User nobody
Group nogroup
ServerName localhost
ServerAdmin webmaster@localhost
ServerRoot /tmp/apache
DocumentRoot /tmp/apache/htdocs
PidFile /tmp/apache/httpd.pid
LoadModule authz_host_module /usr/lib/apache2/mod_authz_host.so
Listen 50080
ErrorLog /tmp/apache/error_log
<DirectoryMatch ^/tmp/apache/htdocs/private>
Order allow,deny
</DirectoryMatch>
imacat@rinse ~ % /usr/sbin/httpd -f /tmp/apache/httpd.conf
imacat@rinse ~ % telnet localhost 50080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /privatedetective.txt HTTP/1.1
Host: localhost
Connection: close
HTTP/1.1 403 Forbidden
Date: Fri, 16 Mar 2007 15:46:45 GMT
Server: Apache/2.2.4 (Unix)
Content-Length: 222
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /privatedetective.txt
on this server.</p>
</body></html>
Connection closed by foreign host.
imacat@rinse ~ % kill $(<//tmp/apache/httpd.pid)
imacat@rinse ~ %
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org