How to fix "Internal error: Berkeley DB error for filesystem"?

After working with the subversion system pretty flawlessy for years (as standalone service and within apache), I had this problem in my apache log files:

[Fri Dec 02 22:56:41 2011] [error] [client 91.118.57.x] (20014)Internal error: Berkeley DB error for filesystem '/svn/repository/db' while opening environment:\n [Fri Dec 02 22:56:41 2011] [error] [client 91.118.57.x] Could not fetch resource information. [500, #0] [Fri Dec 02 22:56:41 2011] [error] [client 91.118.57.x] Could not open the requested SVN filesystem [500, #160029] [Fri Dec 02 22:56:41 2011] [error] [client 91.118.57.x] Could not open the requested SVN filesystem [500, #160029]

The repository was not accessible anymore, so first I started to try to recover the repository:

svnadmin recover /svn/repository/

 That didn´t help at all, so I checked the repository:

svnadmin verify /svn/repository/

Didn´t dig up anything at all either, so at least the repository wasn´t broken. I was looking a around a bit and finally figured out it has to be some kind of a permission problem, so I solved it by running these commands:

find /svn/repository -type f -exec chmod 660 {} \;
find /svn/repository -type d -exec chmod 2770 {} \;



 

 

 

You cannot comment on this entry