I have the following error occurring on occasion when trying to do an svn switch (have it set up to do via a web request):

svn: Can't open file '/root/.subversion/servers': Permission denied

This happens after an apache httpd.conf change and corresponding restart.

How to fix this? I can get it to fix by doing an apache restart - BUT, it often takes multiple tries. Curious if anybody can explain this. Why did this error go away on my 8th apache restart, but not on the prior ones (with no edits to the conf file)?

Basically, I kind of have a "how" in terms of solving this, but I don't have a "why" . . .


My first guess is that SVN is being run as root while Apache is not. Just curious, if you restart Apache using sudo does the error continue to occur?

sudo /etc/init.d/httpd stop
sudo /etc/init.d/httpd start

This sounds a bit like a problem found on StackOverflow ("Running subversion under apache and mod_python"). Perhaps you could review that and see if the solution to that problem (setting the $HOME environment variable prior to starting Apache) applies to your setup.

| improve this answer | |
  • Ah, thanks. Will look into this - could be an selinux issue also. (Still not sure why a restart of apache works in some cases but not others, makes it a little hard to reproduce.) – Neil Jul 12 '10 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.