tags:

views:

2760

answers:

2

Really strange problem here. I'm setting up an SVN server and I'm basically trying to enforce the following rules:

  1. All users have read-only by default
  2. svnadmin can write to the root (to create new projects) and to the project folder (to create the trunk/branches/tags directories)
  3. developers can create directories in //branches and can commit changes to //trunk
  4. Only the admin/project manager can create release tags

Here are my settings:

svnserve.conf

[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz

passwd

[users]
svnadmin = svnadmin
user1 = user1

authz

[groups]
svnadmin = svnadmin
developers = user1

[/]
* = r
@svnadmin = rw

[/test-project/branches]
@developers = rw

[/test-project/trunk]
@developers = rw

I logged in as svnadmin and created /test-project, /test-project/trunk, /test-project/branches, and /test-project/trunk - good.

Logged in as user1 and got access denied when trying to create anything in the root or in /test-project - good.

Still as user1, I created a folder in the trunk and added a file - good.

Now, I logged in as svnadmin and deleted the file... but I cannot delete the folder! More specifically, it says Access denied

svnadmin has rw on the whole repository, so why can't I delete /test-project/trunk/??? (of course, user1 can delete that folder).

Worse, I noticed that svnadmin cannot delete /test-project, /test-project/branches, /test-project/trunk, or /test-project/tags. I now have this test project tree in my repository and I can't get rid of it.

Is there something wrong with my settings? What can I do?

A: 

Figured it out on my own and posting the answer here for the benefit of anyone who encounters the same problem.

Apparently, unlike the actual Linux OS under which this SVN server is running, you are not supposed to have groups with the same names as users.

auths

[groups]
svnadmin = svnadmin
developers = user1

[/]
* = r
@svnadmin = rw

[/test-project/branches]
@developers = rw

[/test-project/trunk]
@developers = rw

should actually be...

[groups]
svnadmins = svnadmin # note the pluralization of the group name
developers = user1

[/]
* = r
@svnadmins = rw # note the pluralization of the group name

[/test-project/branches]
@developers = rw

[/test-project/trunk]
@developers = rw

This explains why @developers were able to delete all of the directories they created while @svnadmin was not; however, it does not explain why @svnadmin was able to create directories in the first place...

... though I will not concern myself with that, as my configuration is now working.

Mike
A: 

sir please i requist to u please give me trick about create folder store the data but cannot delete from our computer

chetan