httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mmccarthy@tribloom.com" <mmccar...@tribloom.com>
Subject Re: [users@httpd] (36)File name too long
Date Wed, 17 Sep 2014 17:15:40 GMT
Thanks for the info. I think the problem is that I am trying to use the 
REMOTE_USER in the rewrite for example:

RewriteCond %{LA-U:REMOTE_USER} !^$

Which is later used in the RewriteRule. I just checked and found that 
when I remove the LA-U:REMOTE_USER part of the rewrite rule the error 
does not occur. This bug report helped me to understand why it was 
failing: https://issues.apache.org/bugzilla/show_bug.cgi?id=45187

I am not quite sure how I can fix my rules though. I understand that 
using an LA-U causes a subrequest in order to get the authenticated user 
and I believe this is what is causing the failure. (Auth causes a 
directory walk?)

Any ideas on how to get the authenticated user for a RewriteRule without 
causing a directory walk? I was tossing around the idea of using an env 
var or a cookie, but both seem like bad ideas.

Thanks,
Michael
On 9/17/2014 11:04 AM, Jim Jagielski wrote:
> It's from ap_directory_walk()
>
>              else if ((rv != APR_SUCCESS && rv != APR_INCOMPLETE)
>                       || !(thisinfo.valid & APR_FINFO_TYPE)) {
>                  /* If we hit ENOTDIR, we must have over-optimized, deny
>                   * rather than assume not found.
>                   */
>                  ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00036)
>                                "access to %s failed (filesystem path '%s')",
>                                r->uri, r->filename);
>                  return r->status = HTTP_FORBIDDEN;
>              }
>
> On Sep 17, 2014, at 12:52 PM, Rich Bowen <rbowen@rcbowen.com> wrote:
>
>> On 09/16/2014 02:50 PM, mmccarthy@tribloom.com wrote:
>>> I am using RewriteRule and the proxy flag to proxy through Apache. When a long
URL is passed through (longer than 255 characters), I get the error below (redacted). I understand
that this is related to the maximum file name on the OS, in this case Ubuntu 14.04. My question
is why is this happening when the URL is not related to a file on the file system? The URL
is rewritten, then proxied to another server that works fine with long URLs.
>>>
>>> [Mon Sep 15 11:42:04.211290 2014] [core:error] [pid 18302:tid 140171735451392]
(36)File name too long: [client xxx.xx.x.xxx:53717] AH00036: access to /<long file path>/_aliases
failed (filesystem path '/<long file path>), referer: http://xx.xx.xx.xxx/index.html
>>>
>>> Thanks,
>> That error message doesn't appear to be from the httpd server itself (ie, that message
doesn't appear anywhere in the source code for trunk, 2.4, 2.2, or 2.0), which leads me to
believe that 1) it's in fact from your filesystem, and 2) there's no direct way to fix that
in httpd configuration.
>>
>> As thy why it matters when the file isn't on the filesystem, that's hard to tell
without more context, but I presume that at some point in the process it is *looking* for
the file in the filesystem.
>>
>> For example, if this RewriteRule is in a .htaccess file, rather than in the main
server config, it did in fact have to navigate to a filesystem directory before consulting
that .htaccess file.
>>
>> -- 
>> Rich Bowen - rbowen@rcbowen.com - @rbowen
>> http://apachecon.com/ - @apachecon
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message