Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Current Setup

  • Fedora 13 32bit

  • Apache 2.2.16

  • Subversion repositories setup under /var/www/svn

I have two different repositories under this directory so my /etc/httpd/conf.d/subversion.conf setup in this way;

LoadModule dav_svn_module     modules/
LoadModule authz_svn_module   modules/

<Location /svn>
   DAV svn
   SVNListParentPath on
   SVNParentPath /var/www/svn

      AuthType Basic
      AuthName "Subversion Repository"
      AuthUserFile /etc/httpd/.htpasswd
      Require valid-user

After copying over my repos and using;

  • chmod 755 -R /var/www/svn

  • chcon -R -t httpd_sys_content_t /var/www/svn

  • chown apache:apache -R /var/www/svn

I can browse my repos fine through the browser, and I can update all my working copies, however when I try to check in from anywhere I get the same error

Can't open file '/var/www/svn/repo/db/txn-current-lock':Permission denied

I have been working on this issue for a while now and cant seem to find a solution to my issues. It might be of some use to know that the repo existed on a different server before this, it has been now moved to this new server.

Everything I have read seems to indicate that the permissions for apache are incorrect, however apache is set to run as User apache and Group apache. So as far as I can tell my setup is correct. The behavior is not though.

Any Ideas?


The only way I was able to get this to work is to disable SELinux, it could also be done by setting the proper booleans with SELinux via setsetbool and getsebool since this is just a home server, I decided to disable SELinux and am reaping the benefits now.

share|improve this question
up vote 0 down vote accepted

Instead of having the directories owned by apache:apache, use apache:subversion. That is,

chown apache:subversion -R /var/www/svn


share|improve this answer
Wouldn't apache need to be a member of the subversion group then? Should I just create a new group 'subversion' and add apache to it? – wfoster Nov 18 '10 at 15:13
I created the subversion group, added apache to it, then set apache to run as User apache Group subversion. Still getting the error when trying to commit. – wfoster Nov 18 '10 at 15:37
No. The subversion group and the apache user define ownership and permission. Saying that its owned by apache:subversion doesn't imply that Apache owns the file. The permission bits define owner, group, and 'nobody' permissions. The Apache server should still be running as User apache, Group apache. Try changing that back first, and we'll continue debugging if need be. – Andrew M. Nov 18 '10 at 22:50
Well after reading through my .conf files a bunch of times and deciding my configuration was fine. I decided to disable SELinux and it works great. Files are still labeled in same manner apache:apache, and I decided to move my repos off of the root.Since this is just a source repo for my school stuff I'm not too worried about security and what not. Thanks for the help! – wfoster Nov 19 '10 at 14:43

The SELINUX boolean value to make SVN write through webdav work is:

setsebool -P httpd_unified=1

My friend experienced this problem and found a solution more than a year ago. (written in japanese)

His name is Itoh, a sake lover, lives in Japan, south of Tokyo.

I am posting this for him.

share|improve this answer
This was the correct fix for Apache 2.x / Subversion 1.9 on CentOS 7.1 – Alex Nov 9 '15 at 20:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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