You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by chetanchatwani <ch...@savvion.com> on 2007/08/29 13:26:34 UTC

How to configure apache for mutilple SVN repository ?

Hi ,

I am having two SVN repository named as sbmrepos and bpmdevrepos located
under /svn directory.
In httpd.conf I am having following config :

<Location "/swa">
    DAV svn
    SVNParentPath /svn
    AuthzSVNAccessFile /svn/sbmrepos/conf/authz
    Require valid-user
    AuthType Basic
    AuthUserFile /svn/sbmrepos/conf/apachepasswd
    AuthName "Savvion Subversion Repository"
</Location>

When I tried to access the repository, I am getting 403 Forbidden error. Any
idea or suggestion  how to configure it ? 

The url  I am trying is 
   http://xyz.savvion.com/swa/svn/sbmrepos/trunk and    
   http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk

Both the repository are having trunk folder and it contains modules.


Regards,
Chetan
-- 
View this message in context: http://www.nabble.com/How-to-configure-apache-for-mutilple-SVN-repository---tf4347805.html#a12387080
Sent from the Subversion Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Dave Pawson <da...@gmail.com>.
On 29/08/2007, chetanchatwani <ch...@savvion.com> wrote:
> I am having two SVN repository named as sbmrepos and bpmdevrepos located
> under /svn directory.
> In httpd.conf I am having following config :
>
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
>
> When I tried to access the repository, I am getting 403 Forbidden error. Any
> idea or suggestion  how to configure it ?


My solution when I had this problem was that the ownership of
the repository was set to root?
I changed it all to apache:apache.

$chown -R  apache:apache /svn

Also, I was on fedora, so the security thing needs changing using
$chcon -R  -h -t httpd_sys_content_t    /svn

But my apache config is just the same as yours.

HTH



-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 29, 2007, at 08:26, chetanchatwani wrote:

> I am having two SVN repository named as sbmrepos and bpmdevrepos  
> located
> under /svn directory.
> In httpd.conf I am having following config :
>
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
>
> When I tried to access the repository, I am getting 403 Forbidden  
> error. Any
> idea or suggestion  how to configure it ?
>
> The url  I am trying is
>    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and
>    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
>
> Both the repository are having trunk folder and it contains modules.

I believe the correct URLs would then be:

    http://xyz.savvion.com/swa/sbmrepos/trunk

and

    http://xyz.savvion.com/swa/bpmdevrepos/trunk


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Kris Deugau <kd...@vianet.ca>.
chetanchatwani wrote:
> Following is the permission for repository, it located under 
> /svn folder :
> 
> permission for /svn
> 
> drwxr-xr-x   4 sbmrepos sbmrepos  4096 Aug 29 03:26 svn
> 
> permission for repository under/svn
> 
> drwx------  7 sbmrepos sbmrepos 4096 Aug 29 03:26 bpmdevrepos
> drwx------  7 sbmrepos sbmrepos 4096 Jun  9 01:51 sbmrepos

Any reason you've got the repositories owned by this separate user? 
You're likely to have problems getting Apache to work with them like this.

> When I try to execute command on Redhat Linux ES5
> 
> chcon -R -h -t httpd_sys_content_t /svn
> 
> getting following error:
> 
> chcon: can't apply partial context to unlabeled file /svn

I *think* you're missing the complete context to give to chcon.  Run "ls 
-Z /var/www", and copy-and-paste one of the context entries there for 
the chcon command.  On my RHEL4 systems, for instance, it's 
"system_u:object_r:httpd_sys_content_t".

> Any help ? There is OS user called sbmrepos with whose login repository is
> created and apache service is start/stop through root user.

Hrm.  For serving repositories through Apache, you typically change the 
ownership to whatever user/group Apache runs as.  On RHEL, Apache 
typically runs as user apache, group apache.

Unless you've got *really* good reasons why the repository may not be 
owned by the same user/group as Apache is running as, it's probably less 
headache if you just run "chown apache:apache /svn".

-kgd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by chetanchatwani <ch...@savvion.com>.
Hi ,

Following is the permission for repository, it located under 
/svn folder :


permission for /svn

drwxr-xr-x   4 sbmrepos sbmrepos  4096 Aug 29 03:26 svn

permission for repository under/svn


drwx------  7 sbmrepos sbmrepos 4096 Aug 29 03:26 bpmdevrepos
drwx------  7 sbmrepos sbmrepos 4096 Jun  9 01:51 sbmrepos


When I try to execute command on Redhat Linux ES5

chcon -R -h -t httpd_sys_content_t /svn

getting following error:

chcon: can't apply partial context to unlabeled file /svn
Any help ? There is OS user called sbmrepos with whose login repository is
created and apache service is start/stop through root user.


Regards,
Chetan


chetanchatwani wrote:
> 
> Hi ,
> 
> I am having two SVN repository named as sbmrepos and bpmdevrepos located
> under /svn directory.
> In httpd.conf I am having following config :
> 
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
> 
> When I tried to access the repository, I am getting 403 Forbidden error.
> Any idea or suggestion  how to configure it ? 
> 
> The url  I am trying is 
>    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and    
>    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
> 
> Both the repository are having trunk folder and it contains modules.
> 
> 
> Regards,
> Chetan
> 

-- 
View this message in context: http://www.nabble.com/How-to-configure-apache-for-mutilple-SVN-repository---tf4347805.html#a12393955
Sent from the Subversion Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Andy Levy <an...@gmail.com>.
On 8/29/07, chetanchatwani <ch...@savvion.com> wrote:
>
> Hi ,
>
> I am having two SVN repository named as sbmrepos and bpmdevrepos located
> under /svn directory.
> In httpd.conf I am having following config :
>
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
>
> When I tried to access the repository, I am getting 403 Forbidden error. Any
> idea or suggestion  how to configure it ?
>
> The url  I am trying is
>    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and
>    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
>
> Both the repository are having trunk folder and it contains modules.

I think you've probably got Apache configured right - the error you're
getting indicates that you don't have access to what you're trying to
access (something in your AuthzSVNAccessFile). Make sure that the
repository name is pre-pended to the path(s) in that file.
http://svnbook.red-bean.com/en/1.4/svn.serverconfig.pathbasedauthz.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Rainer Sokoll <R....@intershop.de>.
On Wed, Aug 29, 2007 at 06:26:34AM -0700, chetanchatwani wrote:

> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>

Don't put AuthzSVNAccessFile and AuthUserFile under SVNParentPath, for
two reasons:
1st, both files wouldbe handled by mod_dav_svn, and 2nd, for security
reasons, these files should never ever accessible from the web, so put
them somewhere outside your ServerRoot.

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Phil <pl...@gmail.com>.
I have mutiple repositories, like about 20.
This is my httpd.conf (well snippet of it):
<Location /svn>
        DAV svn
        SVNParentPath /svn
        AuthzSVNAccessFile /usr/local/apache2/svnaccess.list
        Require valid-user
        SVNIndexXSLT "/svnindex.xsl"
        AuthType Basic
        AuthName "Subversion Repository"
        AuthUserFile /usr/local/apache2/users
        SVNPathAuthz off
</Location>

I hope this helps you. I agree the users file should not be in the path
available on the web



On 8/29/07, chetanchatwani <ch...@savvion.com> wrote:
>
>
> Hi ,
>
> Following is the content of authz file :
>
> [groups]
> sbm-build = chetan,ayyapn
> sbm-bizlogic = ayyapn,jayesh
> sbm-dev = @sbm-build,@sbm-bizlogic
>
> [bpmdevrepos:/]
> @sbm-dev = rw
>
> [sbmrepos:/]
> @sbm-dev = rw
> @sbm-build = r
>
> Any suggestion where I am wrong.
>
>
> Regards,
> Chetan
>
> chetanchatwani wrote:
> >
> > Hi ,
> >
> > I am having two SVN repository named as sbmrepos and bpmdevrepos located
> > under /svn directory.
> > In httpd.conf I am having following config :
> >
> > <Location "/swa">
> >     DAV svn
> >     SVNParentPath /svn
> >     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
> >     Require valid-user
> >     AuthType Basic
> >     AuthUserFile /svn/sbmrepos/conf/apachepasswd
> >     AuthName "Savvion Subversion Repository"
> > </Location>
> >
> > When I tried to access the repository, I am getting 403 Forbidden error.
> > Any idea or suggestion  how to configure it ?
> >
> > The url  I am trying is
> >    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and
> >    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
> >
> > Both the repository are having trunk folder and it contains modules.
> >
> >
> > Regards,
> > Chetan
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-configure-apache-for-mutilple-SVN-repository---tf4347805.html#a12387762
> Sent from the Subversion Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: How to configure apache for mutilple SVN repository ?

Posted by chetanchatwani <ch...@savvion.com>.
Hi ,

Following is the content of authz file :

[groups]
sbm-build = chetan,ayyapn
sbm-bizlogic = ayyapn,jayesh
sbm-dev = @sbm-build,@sbm-bizlogic

[bpmdevrepos:/]
@sbm-dev = rw

[sbmrepos:/]
@sbm-dev = rw
@sbm-build = r

Any suggestion where I am wrong.


Regards,
Chetan

chetanchatwani wrote:
> 
> Hi ,
> 
> I am having two SVN repository named as sbmrepos and bpmdevrepos located
> under /svn directory.
> In httpd.conf I am having following config :
> 
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
> 
> When I tried to access the repository, I am getting 403 Forbidden error.
> Any idea or suggestion  how to configure it ? 
> 
> The url  I am trying is 
>    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and    
>    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
> 
> Both the repository are having trunk folder and it contains modules.
> 
> 
> Regards,
> Chetan
> 

-- 
View this message in context: http://www.nabble.com/How-to-configure-apache-for-mutilple-SVN-repository---tf4347805.html#a12387762
Sent from the Subversion Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to configure apache for mutilple SVN repository ?

Posted by Phil <pl...@gmail.com>.
the file permission on your svn directory should allow access to the user
that apache runs as... that is a problem that I ran into. I have to make the
owner of the files as nobody:nobody

On 8/29/07, chetanchatwani <ch...@savvion.com> wrote:
>
>
> Hi ,
>
> I am having two SVN repository named as sbmrepos and bpmdevrepos located
> under /svn directory.
> In httpd.conf I am having following config :
>
> <Location "/swa">
>     DAV svn
>     SVNParentPath /svn
>     AuthzSVNAccessFile /svn/sbmrepos/conf/authz
>     Require valid-user
>     AuthType Basic
>     AuthUserFile /svn/sbmrepos/conf/apachepasswd
>     AuthName "Savvion Subversion Repository"
> </Location>
>
> When I tried to access the repository, I am getting 403 Forbidden error.
> Any
> idea or suggestion  how to configure it ?
>
> The url  I am trying is
>    http://xyz.savvion.com/swa/svn/sbmrepos/trunk and
>    http://xyz.savvion.com/swa/svn/bpmdevrepos/trunk
>
> Both the repository are having trunk folder and it contains modules.
>
>
> Regards,
> Chetan
> --
> View this message in context:
> http://www.nabble.com/How-to-configure-apache-for-mutilple-SVN-repository---tf4347805.html#a12387080
> Sent from the Subversion Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>