Thursday, January 28, 2010

Subversion subfolder access fun

After such a fantastic morning trying to set up subfolder access on various subversion repositories - its nice to share this little gem with anybody that might be interested.

I wanted a user to have read access to a whole project folder, but to restrict write access to just one folder inside the project. According to the docs I read this should work:

[Project1:/]
newuser = r

[Project1:/trunk/graphics]
newuser = rw

But it didn't. After a whole wasted morning, I found - much to my chagrin - that I had to grant rw rights at the root to the new user, and then deny rights where they weren't applicable, to be able to grant write rights (apache with subversion 1.6.6) to a subfolder (read rights worked ok funnily enough).

[/]
newuser = rw

[Project1:/]
newuser = r

[Project1:/trunk/graphics]
newuser = rw

[Project2:/]
newuser =

I suppose there is some kind of logic there, somewhere...

If you're reading this because you're having the same problem -I really do hope I've helped you.

No comments: