Welcome to the blog of Marcel Oelke from Frankfurt, Germany.

Archive for October, 2006

Chora Subversion Viewer Path Error

Today i faced one of these problems that i really hate. I mean these kind of problems that are absolutly bogus.
Even google had no solution for this one handy. And thats why i am posting this solution, so that anyone that could have the same problem may find the solution a little bit faster.

I installed the Chora cvs/svn viewer today to browse our svn repositories. Beside tons of other problems (especially with Horde) I encountered this one:

Chora displays an error message when trying to browse a subversion repository:
Error svn: Can't check path '/root/.subversion': Permission denied

or in german:

Fehler svn: Kann Pfad '/root/.subversion' nicht prĂĽfen: Keine Berechtigung

After 2 hours of googling (usualy takes 2 minutes) I found the following bug report that gave the useful hint:

http://websvn.tigris.org/issues/show_bug.cgi?id=32

Apache now runs as www, and the “USER” environment is set to “bob”.
However, the “HOME” variable is (incorrectly) set to “/root”.

When PHP calls the svn function, it seems that it picks up the HOME
variable. SVN must probably look for it’s preferences inside
~/.subversion, ~ being the HOME variable (/root). Since it runs as
www, it fails and spits out a permission error. I am not sure if the
USER variable changes something in this.

Because upgrading our subversion version (1.3.2) was not possible, here’s the quick-hack solution:
Edit horde/chora/lib/base.php and add
putenv ("HOME=/var/lib/www");
somewhere.
Replace /var/lib/www with the home directory of your apache user (wwwrun on suse 9.3).

Damn .. i hate such waste of time …