Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6392D9B30 for ; Fri, 16 Mar 2012 12:54:35 +0000 (UTC) Received: (qmail 96946 invoked by uid 500); 16 Mar 2012 12:54:34 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 96787 invoked by uid 500); 16 Mar 2012 12:54:34 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 96778 invoked by uid 99); 16 Mar 2012 12:54:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 12:54:34 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 76.96.30.64 is neither permitted nor denied by domain of jim@jagunet.com) Received: from [76.96.30.64] (HELO qmta07.emeryville.ca.mail.comcast.net) (76.96.30.64) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 12:54:25 +0000 Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by qmta07.emeryville.ca.mail.comcast.net with comcast id mCgs1i0020S2fkCA7Cu521; Fri, 16 Mar 2012 12:54:05 +0000 Received: from [192.168.199.10] ([69.251.91.46]) by omta09.emeryville.ca.mail.comcast.net with comcast id mCu31i008100q0d8VCu4TV; Fri, 16 Mar 2012 12:54:04 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: printing r->filename for access denied errors From: Jim Jagielski In-Reply-To: Date: Fri, 16 Mar 2012 08:54:02 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: dev@httpd.apache.org X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org ++1 On Mar 16, 2012, at 7:54 AM, Eric Covener wrote: > Seems like IRC users are often confused that permission denied errors > include the URI only and not the filesystem path. >=20 > (They're convinced it's failing because httpd is looking in the wrong > place for /index.html, or they think we forgot to add a documentroot, > or have no idea where /foo/bar/baz is supposed to be in the > filesystem) >=20 > Is there any harm in adding it? This is the rv from a stat in the > directory walk. >=20 > Index: server/request.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- server/request.c (revision 1299737) > +++ server/request.c (working copy) > @@ -1094,9 +1094,9 @@ > } > else if (APR_STATUS_IS_EACCES(rv)) { > ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, = APLOGNO(00035) > - "access to %s denied because search " > - "permissions are missing on a component = " > - "of the path", r->uri); > + "access to %s (filesystem path '%s') = denied " > + "because search permissions are missing = on a " > + "component of the path", r->uri, = r->filename); > return r->status =3D HTTP_FORBIDDEN; > } > else if ((rv !=3D APR_SUCCESS && rv !=3D APR_INCOMPLETE) > @@ -1105,7 +1105,8 @@ > * rather than assume not found. > */ > ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, = APLOGNO(00036) > - "access to %s failed", r->uri); > + "access to %s (filesystem path '%s') = failed", > + r->uri, r->filename); > return r->status =3D HTTP_FORBIDDEN; > } >=20 >=20 > --=20 > Eric Covener > covener@gmail.com >=20