Svn – cannot commit svn with dav on ubuntu

apache-2.2svn

So there are several similar questions on serverfault … but the solution is still eluding me.

I am running subversion on Ubuntu 9.04 .. through apache2.2.x ….

I get

Commit failed (details follow):

Can't make directory '/home/kirb/svn/dav/activities.d': Permission denied

when I attempt to commit.

It is definitely a permissions issue… but how to fix it is still eluding me.

My repository is in /home/kirb/svn.

SVN Commit Error says to chgrp .. but I don't seem to be able to. All the apache DAV stuff seems to be working though. I can access my repository just fine through a browser.

Apologies if i am missing something simple here.

Thanks in advance,
Kirb

additional edit: I am not able to sudo chgrp on the directory at all

sudo chgrp -R www-data /home/kirb/svn; chmod -R g+rwx /home/kirb/svn
[sudo] password for kirb:
chmod: changing permissions of `/home/kirb/svn': Operation not permitted
chmod: changing permissions of `/home/kirb/svn/format': Operation not permitted
chmod: changing permissions of `/home/kirb/svn/conf': Operation not permitted
chmod: cannot read directory `/home/kirb/svn/conf': Permission denied
chmod: changing permissions of `/home/kirb/svn/locks': Operation not permitted
chmod: cannot read directory `/home/kirb/svn/locks': Permission denied
chmod: changing permissions of `/home/kirb/svn/db': Operation not permitted
chmod: cannot read directory `/home/kirb/svn/db': Permission denied
chmod: changing permissions of `/home/kirb/svn/README.txt': Operation not permitted
chmod: changing permissions of `/home/kirb/svn/hooks': Operation not permitted
chmod: cannot read directory `/home/kirb/svn/hooks': Permission denied

Best Answer

You need to change the svn files to be in the www-data group, and make them all group-writable. For example, if the repository is /var/svn, then

sudo chown -R root:www-data /var/svn
sudo chmod -R 775 /var/svn

should do it. (Although, come to think of it, you've probably already figured this out...)