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

svn commit failing to use path specified by SVNPath directive

From: Warren Falk <svnusergroup_at_warrenfalk.com>
Date: 2003-08-14 20:49:48 CEST

I posted this in the user forum without response.

Performing a commit to my repository over HTTP/WebDav fails. Examination of Apache's error logs show that the PUT seems to ignore tha SVNParentPath directive in my <Location> directive, and uses instead, the DocumentRoot (resulting in a 403 forbidden because the subfolder doesn't exist there). Performing a checkout works fine.

Here is a recreation of my problem, followed by relevant conf and log files. I have read and followed the directions in the "Definitive Guide." But have found no solution. This setup seems to be the standard setup, so I'm banging my head against the wall trying to figure out why it isn't working and nobody else has reported a problem like this (that I could find).

Since I have followed the book exactly, and it still does not work, My guess is that something is missing from my Apache configuration which the book assumes is there (or is there but assumed missing). Because the book is packaged with the source, I'm posting this here (and because nobody in users@ had an answer).

~$ svnadmin create /data/repository/myproject
~$ chown -R nobody:nobody /data/repository/myproject
~$ svn checkout http://www.mydomain.com/repository/myproject
Checked out revision 0.
~$ echo "testfile" > myproject/testfile.txt
~$ svn add myproject/testfile.txt
A myproject/testfile.txt
~$ svn commit myproject -m "this never works"
Adding myproject/testfile.txt
Transmitting file data .svn: RA layer request failed
svn: Commit failed (details follow):
svn: PUT of
/repository/myproject/!svn/wrk/b73760d5-d2c4-0310-92a9-ab46eda3b27f/testfile.txt:
403 Forbidden (http://www.mydomain.com)

this corresponds to an entry in the error error_log as follows:

[error] [client 66.161.158.50] client denied by server configuration:
/path/to/my/document/root/repository

and the access_log:

66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "OPTIONS /repository/myproject
HTTP/1.1" 200 200
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "MKACTIVITY
/repository/myproject/!svn/act/d03312dd-d2c4-0310-bef5-cf6222a8e10b HTTP/1.1" 201
309
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND /repository/myproject
HTTP/1.1" 207 439
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND
/repository/myproject$ svn checkout http://www.mydomain.com/repository/myproject
Checked out revision 0.
~$ echo "testfile" > myproject/testfile.txt
~$ svn add myproject/testfile.txt
A myproject/testfile.txt
~$ svn commit myproject -m "this never works"
Adding myproject/testfile.txt
Transmitting file data .svn: RA layer request failed
svn: Commit failed (details follow):
svn: PUT of
/repository/myproject/!svn/wrk/b73760d5-d2c4-0310-92a9-ab46eda3b27f/testfile.txt:
403 Forbidden (http://www.mydomain.com)

this corresponds to an entry in the error error_log as follows:

[error] [client 66.161.158.50] client denied by server configuration:
/path/to/my/document/root/repository

and the access_log:

66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "OPTIONS /repository/myproject
HTTP/1.1" 200 200
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "MKACTIVITY
/repository/myproject/!svn/act/d03312dd-d2c4-0310-bef5-cf6222a8e10b HTTP/1.1" 201
309
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND /repository/myproject
HTTP/1.1" 207 439
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND
/repository/myproject/!svn/vcc/default HTTP/1.1" 207 405
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "CHECKOUT
/repository/myproject/!svn/bln/0 HTTP/1.1" 201 323
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPPATCH
/repository/myproject/!svn/wbl/d03312dd-d2c4-0310-bef5-cf6222a8e10b/0 HTTP/1.1" 207
365
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND /repository/myproject
HTTP/1.1" 207 390
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "CHECKOUT
/repository/myproject/!svn/ver/0/ HTTP/1.1" 201 322
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND
/repository/myproject/testfile.txt HTTP/1.1" 404 301
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PUT
/repository/myproject/!svn/wrk/d03312dd-d2c4-0310-bef5-cf6222a8e10b/testfile.txt
HTTP/1.1" 403 351

What gives? Here is the relevant excerpt from httpd.conf

<VirtualHost 12.23.34.45:80>
        ServerAdmin webmaster@mydomain.com
        DocumentRoot /path/to/my/document/root
        ServerName mydomain.com
        ServerAlias www.mydomain.com
        <Location /repository>
                DAV svn
                SVNParentPath /data/repository
 2F!svn/vcc/default HTTP/1.1" 207 405
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "CHECKOUT
/repository/myproject/!svn/bln/0 HTTP/1.1" 201 323
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPPATCH
/repository/myproject/!svn/wbl/d03312dd-d2c4-0310-bef5-cf6222a8e10b/0 HTTP/1.1" 207
365
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND /repository/myproject
HTTP/1.1" 207 390
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "CHECKOUT
/repository/myproject/!svn/ver/0/ HTTP/1.1" 201 322
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PROPFIND
/repository/myproject/testfile.txt HTTP/1.1" 404 301
66.161.158.50 - - [14/Aug/2003:00:21:01 -0400] "PUT
/repository/myproject/!svn/wrk/d03312dd-d2c4-0310-bef5-cf6222a8e10b/testfile.txt
HTTP/1.1" 403 351

What gives? Here is the relevant excerpt from httpd.conf

<VirtualHost 12.23.34.45:80>
        ServerAdmin webmaster@mydomain.com
        DocumentRoot /path/to/my/document/root
        ServerName mydomain.com
        ServerAlias www.mydomain.com
        <Location /repository>
                DAV svn
                SVNParentPath /data/repository
        </Location>
</VirtualHost>

Notice that the error log shows that apache is trying to access the repository folder under the document root, but of course, it is not there - why does commit try to access the repository in the document root whereas the checkout correctly looks to the repository parent folder pointed to by SVNParentPath? It has to be something obvious because people have done this before right?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 15 05:03:08 2003

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

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