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

Re: Strange SVN + Apache Behaviour

From: Shad Sharma <shadanan_at_gmail.com>
Date: Fri, 7 Mar 2008 03:50:05 -0500

On Fri, Mar 7, 2008 at 2:35 AM, Bernhard Fischer <bf_at_abenteuerland.at> wrote:
>
> On Thursday 06 March 2008, Shad Sharma wrote:
> > Dear All,
> >
> > I seem to be having some trouble with my installation of SVN + Apache.
> > I have been using SVN on my server without any problems, however, I
> > recently found it necessary to have an instance of SVN running for
> > several different virtual hosts. So, in order to support this, I
> > decided to install the SVN support into Apache via the mod_dav_svn.so
> > module.
> >
> > After having created my repository, I modified the httpd.conf
> > configuration file for the cargopartnersnetwork.com section as
> > follows:
> >
> > <VirtualHost 66.197.7.160:80>
> > <Directory /home/cpnadmin/cargopartnersnetwork.com/html>
> > Options Indexes Includes FollowSymLinks
> > AllowOverride All
> > </Directory>
> > ScriptAlias /cgi-bin/awstats /var/www/cgi-bin/awstats
> > Alias /awstats /var/www/html/awstats
> > Alias /myadmin /var/www/html/myadmin
> > ScriptAlias /mail /var/www/cgi-bin/openwebmail/openwebmail.pl
> > ScriptAlias /cgi-bin/openwebmail /var/www/cgi-bin/openwebmail
> > Alias /openwebmail /var/www/html/openwebmail
> > ServerName cargopartnersnetwork.com
> > DocumentRoot /home/cpnadmin/cargopartnersnetwork.com/html
> > SuexecUserGroup cpnadmin cpnadmin
> > ServerAlias "www.cargopartnersnetwork.com"
> > ServerAdmin "shadanan_at_gmail.com"
> > ScriptAlias "/cgi-bin/" "/home/cpnadmin/cargopartnersnetwork.com/cgi-bin/"
> > CustomLog "/home/cpnadmin/cargopartnersnetwork.com/access_log" "combined"
> > ErrorLog "/home/cpnadmin/cargopartnersnetwork.com/error_log"
> > <Location /svn>
> > DAV svn
> > SVNPath /home/cpnadmin/cargopartnersnetwork.com/repos/
> > SecFilterRemove 9001
> > SecFilterRemove 300015
> > #AuthType Basic
> > #AuthName "Cargo Partners Network SVN repository"
> > #AuthUserFile /home/cpnadmin/cargopartnersnetwork.com/repos/conf/htpasswd
> > #Require valid-user
> > </Location>
> >
> > The server serves the repository at
> > http://cargopartnersnetwork.com/svn. I have disabled authentication
> > for the time being because I didn't want it to get in the way. I also
> > found that it was necessary to change some of the application firewall
> > rules via the SecFilterRemove directives.
> >
> > If you browse to that location in a browser, it appears as though the
> > SVN service is working correctly. Checkout works perfectly. The issue
> > seems to pop up when you try to import a project, or in some way
> > modify the repository. I'll illustrate with a quick example by trying
> > to import a new file into the repository. From a terminal:
> >
> > wolverine:~ shadanan$ mkdir Test
> > wolverine:~ shadanan$ cd Test
> > wolverine:Test shadanan$ ls
> > wolverine:Test shadanan$ svn co
> > http://cargopartnersnetwork.com/svn/CargoPartnersNetwork .
> > Checked out revision 1.
> > wolverine:Test shadanan$ ls
> > wolverine:Test shadanan$ echo "This is my test file" > testfile.txt
> > wolverine:Test shadanan$ ls
> > testfile.txt
> > wolverine:Test shadanan$ cat testfile.txt
> > This is my test file
> > wolverine:Test shadanan$ svn add testfile.txt
> > A testfile.txt
> > wolverine:Test shadanan$ svn commit --editor-cmd vi
> > Adding testfile.txt
> > Transmitting file data .svn: Commit failed (details follow):
> > svn: PUT of
> > '/svn/!svn/wrk/06795e77-6b02-4674-9390-e6cc7b561a40/CargoPartnersNetwork/te
> >stfile.txt': 403 Forbidden (http://cargopartnersnetwork.com)
> > svn: Your commit message was left in a temporary file:
> > svn: '/Users/shadanan/Test/svn-commit.2.tmp'
> > wolverine:Test shadanan$
> >
> > If we look at the error_log file on the server we see this:
> > [Thu Mar 06 00:00:30 2008] [error] [client 67.71.55.95] client denied
> > by server configuration:
> > /home/cpnadmin/cargopartnersnetwork.com/html/svn
> >
> > It's as though its trying access the folder from the public html
> > folder instead of the svn repository folder. I'm not sure why this is
> > happening. Any help would be greatly appreciated.
> >
> > Kind regards,
> > Shad Sharma
> >
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> > For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
> The user running the apache must have r/w access to the directory on the
> filesystem.
>
> Your repository seems to be located
> in /home/cpnadmin/cargopartnersnetwork.com/repos/ but the path of the virtual
> host is /home/cpnadmin/cargopartnersnetwork.com/html/ and there. There is no
> Alias for this. That meens Apache looks up your repository
> in /home/cpnadmin/cargopartnersnetwork.com/html/svn/ but it isn't really
> there.
>
> Bernhard
>

Hi Bernhard,

That's an insightful point which I did explore, however, you are not
supposed to create an alias to your svn folder from your html folder.
If you do that, then apache tries to read that folder like a standard
html folder instead of the special DAV svn type as instructed by the
<Location> directive.

I tried creating my repository in the actual html folder, i.e. at:
/home/cpnadmin/cargopartnersnetwork.com/html/svn
But this created new problems. The manuals I have been following
mentioned nothing about being required to put the svn repository in
the html folder (I tried it out of desperation).

Currently, I am able to checkout existing projects with the current
settings. This indicates that at least the read permissions are
correct and the http GET requests are being handled correctly. In
fact, I can even create folders in the repository. So, the write
permissions are set correctly. This leads me to believe that there
*must* be some strange directive in my apache configuration file that
is somehow redirecting my request to the wrong directory, or a
directive that is blocking the instruction based on a filter of some
sorts. Unfortunately, I'm not sufficiently adept at reading the apache
configuration to file to be able to tell which it is, if it is indeed
one of these.

Any other thoughts?

Kind regards,
Shad

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-07 10:40:43 CET

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.