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

I've set-up a subversion server accessible with Apache/DAV and after screwing up the repositories file permissions a couple of days ago I started wondering if there's a better way to do this than the way I'm doing it.

The repositories are owned by a dedicated user and group, and apache runs as the customary www:www user, hence it has no write permissions to the repositories. So far my solution has been to add the www user to the svn group and make sure that the files inside the repositories are group-writable... but six months from now I'll create a new repository, forget to fix file permissions and get some email as soon as someone tries to commit something.

Is there any other way to do that? Maybe force svnadmin to create repositories group-writable in the first place? (In case you're wondering the server is FreeBSD 6.2)

share|improve this question

When you access the repository with Apache, the user Apache runs as must have write permission. So, the simplest solution is to give the repository to this user.

Here is how it looks on my Debian machine where Apache runs as www-data:

    % ls -ald /home/Subversion-Repository 
    drwxr-xr-x 7 www-data www-data 4096 Nov 14 10:02 /home/Subversion-Repository

This is only a problem if you want the same repository to be accessible via Apache/DAV and via another mean. But this practice is discouraged. I quote:

Fortunately, most repository administrators will never need to have such a complex configuration. Users who wish to access repositories that live on the same machine are not limited to using file:// access URLs—they can typically contact the Apache HTTP server or svnserve using localhost for the server name in their http:// or svn:// URL. And maintaining multiple server processes for your Subversion repositories is likely to be more of a headache than necessary. We recommend that you choose a single server that best meets your needs and stick with it!

share|improve this answer
Good quote! Just wondering, is it possible to allow only http:// access to a given repository? – Jan 1 '13 at 16:37
You could grant access only to user under which apache is running (www-data/apache/etc...) – ALex_hha Jul 15 '13 at 16:20

The long term solution is to use ACLS to allow the www user write access to the directory tree and all future directories created in the tree.

Try this URL to get started.


share|improve this answer

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.