0

I have successfully installed svn on my PC using this tutorial without any problem https://help.ubuntu.com/community/Subversion (I am using Access via WebDAV protocol (http://))

Ok, now I have very specific need as it is outside the scope of above tutorial.

I made a user using the command mentioned in tutorial

sudo htpasswd -c /etc/subversion/passwd user_name

First of all I don't understand what below command do in this process

svn co http://localhost/svn/myproject myproject --username user_name

I am assuming it allows user_name to access the myproject

After all this done I created whole new repo by the name secondproject Followed the same process and this time named the user second_user

But for some reason the user user_name can access both the repos and actually I want is that user_name can only access myproject and second_user and only access secondproject. I am assuming because they both authorizing from the common passwd file located in /etc/subversion/

I googled my problem and found a solution by editing 3 files located in /home/svn/conf. passwd, authz, svnserve.conf

My svnserve.conf looks like

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

My authz looks like

[groups]
developers = testuser
[/]
@developers = rw

And my passwd looks like

[users]
testuser = test123

But for some reason these files don't have any effect. I cannot use the user testuser. Also, once I login with user user_name through browser I cannot change the user in browser. I am having same kind of problem in RapidSVN. No matter what I do I cannot commit changes using user testuser, it always commits with the user user_name. I must be missing some kind of setting which I don't see anywhere on internet.

In short my requirements are to create 2 different repos. Having 1 user for each repo which will have access to their corresponding repos only.

Let me know if you need any other info from my end to solve this problem. I tried to be as brief as possible.

  • 2
    You need to read the Subversion manual. http://svnbook.org/ All that tutorial taught you how to do was install the software and get a barebones service running. Randomly editing files that you found via a Google search without understanding how they're used (hint: they probably aren't even being referenced by your setup) is not going to get you anywhere. – alroc Jul 04 '14 at 14:22
  • I know reading a manual will help but I don't have much time to do that, that's why I came here for help. (btw have you seen that manual? It is huge :-|). I am almost done with my setup, just need to figure out the proper way of setting up access rules. – Kunal Mawar Jul 07 '14 at 05:28
  • I have in fact "seen that manual" - I've read the whole thing (a previous version), in fact. There's a very clearly labeled section on setting up access control. If someone were to type out what you need to do to set it up properly, it would take you as long to read as it will take to read the appropriate portions of the manual. – alroc Jul 07 '14 at 12:46

1 Answers1

0

ok I figured it out what was wrong with my setup. Once I configure my setup for WebDAV protocol I cannot use the custom protocol (svn://). And if I do try it WebDAV settings will override custom settings.

All I had to do is create a new repo and straight away skip to custom protocol settings.