You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Matthew Hodgson <ma...@arasphere.net> on 2003/10/01 20:47:12 UTC

Strange (13)permission denied in 1.28

Hi all,

I just upgraded from Apache 1.27/mod_perl 1.27 to Apache 1.28/mod_perl
1.28 and am noticing some weird behaviour on Apache::Registry scripts -
executing a Registry script ( /webroot/www.domain.com/perl/test.pl ) by
calling a URL such as:

http://www.domain.com/perl/test.pl/movies/image/1234

pops up a message in the error log that:

[Wed Oct 1 14:13:01 2003] [error] [client 217.207.98.119] (13)Permission
denied: access to /movies/images/1234 failed because search permissions
are missing on a component of the path

The script itself seems to run correctly - test.pl is a completely simple
dummy which just prints headers and exits.

Now, /webroot/www.domain.com/movies/ exists, deliberately has permissions
0700 and is owned by root - but why is Apache or Apache::Registry trying
to stat that path at all - and how do I stop it or stop the error
messages?

any help would be gratefully received;

Matthew.

________________________________________________________________
Matthew Hodgson   arathorn@theonering.net   Tel: +44 7968 722968
             Arathorn: Co-Sysadmin, TheOneRing.net®

Re: Strange (13)permission denied in 1.28

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Matthew Hodgson wrote:
> Hi all,
> 
> I just upgraded from Apache 1.27/mod_perl 1.27 to Apache 1.28/mod_perl
> 1.28 and am noticing some weird behaviour on Apache::Registry scripts -
> executing a Registry script ( /webroot/www.domain.com/perl/test.pl ) by
> calling a URL such as:
> 
> http://www.domain.com/perl/test.pl/movies/image/1234
> 
> pops up a message in the error log that:
> 
> [Wed Oct 1 14:13:01 2003] [error] [client 217.207.98.119] (13)Permission
> denied: access to /movies/images/1234 failed because search permissions
> are missing on a component of the path
> 
> The script itself seems to run correctly - test.pl is a completely simple
> dummy which just prints headers and exits.
> 
> Now, /webroot/www.domain.com/movies/ exists, deliberately has permissions
> 0700 and is owned by root - but why is Apache or Apache::Registry trying
> to stat that path at all

it's apache that is doing that stat call, and it's doing it because your URL 
has extra path information in it, and that extra path information happens to 
coincide with an existing directory structure.

see httpd_request.c in the apache sources and look for get_path_info.

> - and how do I stop it or stop the error
> messages?
> 
> any help would be gratefully received;

reconstruct your URL to test.pl?movies/image/1234 and use $r->args, or use 
test.pl?/moviefoo/image/1234 and substitute 'movie' for 'moviefoo' in 
$r->path_info before you use it in your script.

HTH

--Geoff