[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Confused subversion?

From: Preston A. Elder <prez_at_goth.net>
Date: 2005-11-20 10:01:42 CET

On Fri, 18 Nov 2005 03:05 pm, Mark Shead wrote:
> > And yes, the permissions on the repositories are correct (they're
> owned by
> > the apache user).
>
> You might check to make sure that the permissions are set for all of the
> subdirectories. I've run into problems before when I ran a local
> command as root and it created a file that wasn't owned by apache. I
> can't remember if it was the same error, but it seems similar.

When I said the permissions are correct, I ment it. ALL the permissions were
correct (I've been admining linux boxes for over 7 years, permissions are the
first thing I look for if something says 'permission denied' or 'failed to
open').

You might be interested to know the problem was because of the order of
interperetation of apache commands.

I had my error documents set so that if an error occured, it would go
to /error/<error-file>.html, and an alias for /error/ to go to a specific
directory on my filesystem (where the custom error HTML files are).

However because I was using <Location /> (not <Location /svn>), when an error
occured (say, authorization required, which is why this only happened on
check-IN, but not check-OUT), it would correctly figure out the location of
the error document (/error/AUTHORIZATION.REQUIRED.html) but it would NOT
apply the alias, instead the <Location /> tag (and thus, DAV svn) would take
effect. I expected aliases to be figured out first, though I suppose it
makes sense that they were not (since it would interfere with re-writes).

The way I saw it, I had two ways around this. Either change my Location to:
<LocationMatch "^/(?!error)"> which did work (kind of), and then my error
documents showed up correctly, however it would give me a strange error (more
or less 'Bad Request') when I tried to check in (once again, checkout was
unaffected. For interested parties, the error was (in apache error_log):

[Fri Nov 18 12:11:09 2005] [error] [client 66.11.199.154] Invalid URI in
request MKACTIVITY
%5E/(%3F!error)/mantra/!svn/act/5ee74c87-dc05-0410-b54d-b1b072100782 HTTP/1.1

The other solution was to skip Location tags completely, and go with Directory
tags, ie. <Directory /var/svn/repos> ... </Directory> instead of location
tags. This works just fine, and errors show up as errors, and my
repositories work correctly, including commit. This IS a little paritcular
though. Initially I had <Directory /var/svn/repos/*>, which again worked for
errors and non-checkins, however also failed for checkins, with the error
405, though it didn't show up in the apache error_log, in the access_log I
would see:

66.11.199.154 - - [18/Nov/2005:12:19:50 -0800]
"MKACTIVITY /var/svn/repos/*/mantra/!svn/act/d3dd60a6-dc05-0410-96b9-e23e61ce727e
HTTP/1.1" 405 960 "-" "SVN/1.2.3 (r15833) neon/0.24.7"

It seems strange to me that it would re-write the URL with the LocationMatch
or Directory string, however it obviously did in both cases, which was fine
once I got the directory string sorted.

In the end, this problem only happened because I did not want:
http://svn.neuromancy.net/svn/project/...

I wanted:
http://svn.neuromancy.net/project/...

And I got it working, however just as forewarning to anyone else who wishes to
try something similar, custom error documents and <Location /> don't play
well with eachother.

-- 
PreZ :)
Systems Administrator, GOTH.NET (http://www.goth.net)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Nov 20 10:03:34 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.