“Could not open the requested SVN filesystem”

2007 November 2
tags: , ,
by mcgrue

“Could not open the requested SVN filesystem”

Sometimes problems happen.

Sometimes problems happen when you install svn with apache 2 and dav.

Sometimes after installing all the binaries and editing your apache configuration file (and, naturally, restart apache), you get the following error:

svn: Could not open the requested SVN filesystem

Sometimes this happens.

Usually it means “lol, you need to chown/chgrp the repos to your apache’s user”. Usually. And because this is the usual case, that’s what all the googles I check suggested.

However, it bears mention that I’m, in fact, somewhat experienced at this point in Linux administration. I chown. That’s not even a pun.

The rub is that’s a catch-all for any read problems. The error in my case was “lol, you’re pointing to the wrong directory with the wrong directive, noob.”

To wit, I was using (in my apache configuration file):

<Location /svn>
        DAV svn
        SVNPath /repos/svn
#...
</Location>

…when I actually wanted…

<Location /svn>
        DAV svn
        SVNParentPath /repos/svn
#...
</Location>

I wanted SVNParentPath because it was a directory containing many repositories, instead of a single repository. How simple. Yet, while doing 2 am hungover-style administration, somewhat frustrating.

An aside about Linux paths and URLs

This conf snip is a good example of something I find frustrating annoying understandable-but-sometimes-confusing. Unix filesystem paths, like http urls, use the forward-slash (/) instead of the backslash (\). This conflation of slashing makes them look like each other in configuration files. This mainly becomes an issue for neophytes tinkering with apache for the first (and perhaps subsequent) times.

For example, in the above conf-snippets, the /svn refers to http://www.verge-rpg.com/svn, a Location defined in apache saying “hey, I exist to teh internots!”

Meanwhile, /repos/svn refers to a folder on the server’s filesystem. It can be easy to think, in this context, that something might be at http://www.verge-rpg.com/repos/svn on the internet.

Anyone with any small grasp of the nature of what’s going on in this task will be able to separate the two mentally, since here’s we’re trying to make a bridge between clients via the internet and the svn repo files on the server, but the slashy-syntax can lead to confusion. I know back when I was a young adminling unwrapping his first local development install of apache this stuff caused no end of heartache and strife.

Anyway, I’m not saying MS-style backward-slashes are better. In fact, they have their own brand of obnoxiousness in the form of unintended escape sequences. But in this instance, backslashes would highlight the difference between a webpath and a filepath.

This digression is what happens when someone likes aphorisms and being long-winded.

10 Comments leave one →
2010 April 27
Wayne permalink

Just wanted to say THANKS for posting this… I ran into this today at work — someone had made a bad edit in a previously-working httpd.conf file — and changing to SVNParentPath fixed it.

2010 August 14

[...] | Ben McGraw’s Egometry on The Magical Meaning of ‘M’Wayne on “Could not open the requested SVN filesystem”Michael North on Portal “Camera Shy” achievement picture tutorial, Part 2Jonas on I feel [...]

Pingback
2010 November 6

You are the man. Unless you’re a woman named Ben.

2010 December 28
Dima Gutzeit permalink

Thanks. I was banging by head in the wall over this for two hours and the answer was so simple …

2011 April 26

Thanks for the examples – now it makes sense. Very helpful!

2011 May 3
Colin permalink

Much swearing googling led me here, and this solved my issue. Thanks for sharing.

2011 May 3

No problem. My philosophy is “if I was angry and solving it took many hours, I could probably save others some time by posting about it…”

2011 July 25
mumbar permalink

Thank you!! You did save me much time. Laconic and helpful.

2011 September 21
arthemis permalink

Thanks, that was exactly what i’ve been looking for.

2012 January 6
Ted S permalink

Many thanks for this post. I wish I had only spent a couple of hours on this issue, but it was three days!

A note of clarification for others:

“lol, you need to chown/chgrp the repos to your apache’s user” in plain language is “You must change the directory’s owner for the directory used in the Apache Location directive”. In my case that was:

[root@ ~]# chown apache:apache -R /var/svn

Thanks, Ted S.

Leave A Comment

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS