On Fri, 9 May 2003, Rich Bowen wrote:
> > > Now, it might be nice if it was more explicit, but at least this error
> > > message give a clue where to look.
> >
> > As long as we are taking all this trouble, we might as well special case
> > the EACCES error and return something more specific.
>
> +1
OK. Here is a tested patch, but I'll wait for a couple explicit +1s
before committing.
I'm not sure if perhaps the message should say "... because search
permissions (chmod +x) are missing ..." to help newbies.
Index: http_request.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
retrieving revision 1.168
diff -u -d -b -u -r1.168 http_request.c
--- http_request.c 3 Feb 2003 17:13:23 -0000 1.168
+++ http_request.c 9 May 2003 20:27:32 -0000
@@ -288,7 +288,12 @@
}
else {
#if defined(EACCES)
- if (errno != EACCES)
+ if (errno == EACCES)
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ "access to %s failed because search "
+ "permissions are missing on a component "
+ "of the path", r->uri);
+ else
#endif
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
"access to %s failed", r->uri);
I'm experiencing a should-not-happen condition in apache 1.3.27, and wondered if anyone else could verify for me. In the case of a 403 error caused by...
Rich Bowen
rbowen@...
May 9, 2003 5:36 pm
... Yes, this is a very longstanding and very irritating omission. I don't think I would be exagerating if I said this was the source of hundreds of confused...
... Good quick sluthing. ... Having one error for each item in the DirectoryIndex (ie, one for index.html, index.htm, and index.php) seems like a small penalty...
Joshua Slive
joshua@...
May 9, 2003 6:23 pm
... Yes. I am also +1 on this, and have numerous 1.3 installations on which I can test it. -- Rich Bowen Apache - mod_perl - Perl - CGI ...
Rich Bowen
rbowen@...
May 9, 2003 6:53 pm
... With LogLevel set at debug, I'm just getting: [Fri May 9 15:33:11 2003] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html failed No...
Rich Bowen
rbowen@...
May 9, 2003 7:33 pm
... What does your DirectoryIndex directive look like? Try something like DirectoryIndex a b c d e ... As long as we are taking all this trouble, we might as...
Joshua Slive
joshua@...
May 9, 2003 7:36 pm
... Ah, yes, I get: [Fri May 9 16:10:43 2003] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html failed [Fri May 9 16:10:43 2003]...
Rich Bowen
rbowen@...
May 9, 2003 8:08 pm
... OK. Here is a tested patch, but I'll wait for a couple explicit +1s before committing. I'm not sure if perhaps the message should say "... because search ...
Joshua Slive
joshua@...
May 9, 2003 8:35 pm
... +1 from me (tested) ... the message is plenty long already...
Jeff Trawick
trawick@...
May 9, 2003 9:22 pm
... +1 ... That would not only help the newbies, it would help the "tech support" people who are faced with the beligerent newbies who insist that the ...
Rich Bowen
rbowen@...
May 11, 2003 12:28 am
... The # of entries would equal the # of values for DirectoryIndex. At least, that's what the original bug handled. -- ...
Jim Jagielski
jim@...
May 9, 2003 7:46 pm
... That's as designed, IIRC, though I cannot recall *why* we did it that way... -- ===========================================================================...
Jim Jagielski
jim@...
May 9, 2003 6:06 pm
... Then I would suggest that it is a bad design, and leads to a lot of user confusion. Unless there's a really good reason for this, it would be nice to have...