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

Re: Berkeley DB error

From: James FitzGibbon <jfitzgibbon_at_primustel.ca>
Date: 2004-10-23 18:04:02 CEST

On Oct 23, 2004, at 11:55 AM, Jakub Nadolny wrote:

> I have just set up Subversion and it works fine for a while, but after
> few commits DB falls down and while trying to access SVN, I have a
> message:
>
> svn: Berkeley DB error while opening environment for filesystem
> /var/svn/dharmadhatu/db:
> DB_RUNRECOVERY: Fatal error, run database recovery
>
> Then I kill svnserve, make svnadmin recover, start again svnserve and
> everything is fine... till the next crash.
>
> I was trying to find out the trace what could be the problem source and
> the only thing is that when I commit files from local network, all
> works
> fine, but when my friend does it from outside, then DB crashes.

The umask of the webserver process is probably different from the umask
of the local process. So if your local umask is 022 and you do
something,
files in the db directory get mode 0644, which prevents the web server
from
writing to them (even if you are in a common group).

To confirm if this is the problem, look in the db directory after access
fails from the web, note the perms, then g+w any files that have their
group perms set to r-- or r-x and try again. If it works, that's your
problem.

Personally, I do two things to address this:

1. Run a dedicated web server for SVN with a umask of 007 (I run a
separate
one so that my other CGIs don't get access to the repo nor do they have
to
contend with the 007 umask).

2. Set up aliases for svn commands when I run them from the shell to set
my umask to 007 for the duration of svn, svnadmin, svnrecover, etc.

There is a section in the SVN book on this (I think it's called managing
multiple repo access methods or some such).

Regards

-- 
j.
----------------------------------------------------------------------------
This electronic message contains information from Primus Telecommunications
Canada Inc. ("PRIMUS") , which may be legally privileged and confidential.
The information is intended to be for the use of the individual(s) or entity
named above. If you are not the intended recipient, be aware that any
disclosure, copying, distribution or use of the contents of this information
is prohibited. If you have received this electronic message in error, please
notify us by telephone or e-mail (to the number or address above)
immediately. Any views, opinions or advice expressed in this electronic
message are not necessarily the views, opinions or advice of PRIMUS.
It is the responsibility of the recipient to ensure that
any attachments are virus free and PRIMUS bears no responsibility
for any loss or damage arising in any way from the use
thereof.The term "PRIMUS" includes its affiliates.
----------------------------------------------------------------------------
Pour la version en français de ce message, veuillez voir
 http://www.primustel.ca/fr/legal/cs.htm
----------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 23 18:04:23 2004

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.