[kforge-user] svnadmin: Can't open file '/root/.subversion/servers'

Rufus Pollock rufus.pollock at okfn.org
Mon Feb 12 11:33:01 UTC 2007

Gunnar Johansson wrote:
> Hi,
> First, thanks for what seems to be a very nice system. We have used
> trac+svn for more than a year now, and I have searched for some kind
> of layer around this so our group can manage projects and repositories
> by themselves. KForge seems to be a very close match! If I can get
> around my issues that is..
> So, when trying to add the svn service I get the following:
> ==============
> Traceback (most recent call last):
> File 
> "/usr/local/lib/python2.5/site-packages/Django-0.95.1-py2.5.egg/django/core/handlers/base.py" 
> in get_response
>  74. response = callback(request, *callback_args, **callback_kwargs)
> File 
> "/usr/local/lib/python2.5/site-packages/kforge/django/apps/kui/views/service.py" 
> in create
>  161. return view.getResponse()
> File "/usr/local/lib/python2.5/site-packages/kforge/plugin/svn.py" in
> onServiceCreate
>  22. self.utils.createRepository(path)
> File "/usr/local/lib/python2.5/site-packages/kforge/plugin/svn.py" in
> createRepository
>  121. raise Exception('svnadmin create error on %s: %s' % (cmd, output))
>  Exception at /project/testing/services/create/
>  svnadmin create error on svnadmin create
> /home/kforge/project_data/testing/svn/12: svnadmin: Can't open file
> '/root/.subversion/servers': Permission denied
> ==============
> Do you know why svnadmin tries to grab settings from /root ? I run the
> httpd as user apache. I've verified all permissions and the folder

As you say it seems to be trying to grab settings from root. Can you try 
running svnadmin as your httpd user (e.g. something like sudo -u httpd 
svnadmin ...) and see what happens.

> /home/kforge/project_data/testing/svn/12 is created.

But I doubt there is any repository created there. (If I remember 
correctly) the folder is automatically created prior to running svnadmin 
so as to ensure the relevant directory tree is in place.

> My guess is that the apache user is assigned /root as "home" when
> executing the command through python, but I don't know too much about
> python.. Any way to circumvent this, or test if this is the problem?

This certainly does not happen on the machines we test on those being 
debian/ubuntu and mac osx. The command is being run as if from a shell 
so I don't think it is anything python specific.

> Also, there are some problems with how the trac version number is
> parsed. We run trac 0.11 (dev) which actually is < 0.8 when parsed as
> float.  But more about that later, now my first concern is to get svn
> working.

Good point -- we'll need to improve the version parsing there. Perhaps 
we could use setuptools version-parsing code.


Rufus Pollock

More information about the kforge-user mailing list