<p>I have set up a repository using SVN and uploaded projects. There are multiple users working on these projects. But, not everyone requires access to all projects. I want to set up user permissions for each project.</p>

<p>How can I achieve this?</p>

[{'answer_id': 81396, 'author': 'Mladen Mihajlovic', 'author_id': 11421, 'author_profile': 'https://Stackoverflow.com/users/11421', 'pm_score': 2, 'selected': False, 'text': '<p>The best way is to set up Apache and to set the access through it. Check the <a href="http://svnbook.red-bean.com/" rel="nofollow noreferrer">svn book</a> for help. If you don\'t want to use Apache, you can also do minimalistic access control using svnserve.</p>\n'}, {'answer_id': 81457, 'author': 'Stephen Bailey', 'author_id': 15385, 'author_profile': 'https://Stackoverflow.com/users/15385', 'pm_score': 6, 'selected': False, 'text': '<p>In your <strong>svn\\repos\\YourRepo\\conf</strong> folder you will find two files, <strong>authz</strong> and <strong>passwd</strong>. These are the two you need to adjust.</p>\n\n<p>In the <strong>passwd</strong> file you need to add some usernames and passwords. I assume you have already done this since you have people using it:</p>\n\n<pre><code>[users]\nUser1=password1\nUser2=password2\n</code></pre>\n\n<p>Then you want to assign permissions accordingly with the <strong>authz</strong> file:</p>\n\n<p>Create the conceptual groups you want, and add people to it:</p>\n\n<pre><code>[groups]\nallaccess = user1\nsomeaccess = user2\n</code></pre>\n\n<p>Then choose what access they have from both the permissions and project level.</p>\n\n<p>So let\'s give our "all access" guys all access from the root:</p>\n\n<pre><code>[/]\n@allaccess = rw\n</code></pre>\n\n<p>But only give our "some access" guys read-only access to some lower level project:</p>\n\n<pre><code>[/someproject]\n@someaccess = r\n</code></pre>\n\n<p>You will also find some simple documentation in the <strong>authz</strong> and <strong>passwd</strong> files.</p>\n'}, {'answer_id': 81468, 'author': 'RB.', 'author_id': 15393, 'author_profile': 'https://Stackoverflow.com/users/15393', 'pm_score': 3, 'selected': False, 'text': '<p>Although I would suggest the Apache approach is better, SVN Serve works fine and is pretty straightforward.</p>\n\n<p>Assuming your repository is called "my_repo", and it is stored in C:\\svn_repos:</p>\n\n<ol>\n<li><p>Create a file called "passwd" in "C:\\svn_repos\\my_repo\\conf". This file should look like:</p>\n\n<pre><code>[Users]\nusername = password\njohn = johns_password\nsteve = steves_password\n</code></pre></li>\n<li><p>In C:\\svn_repos\\my_repo\\conf\\svnserve.conf set:</p>\n\n<pre><code>[general]\npassword-db = passwd\nauth-access=read\nauth-access=write\n</code></pre></li>\n</ol>\n\n<p>This will force users to log in to read or write to this repository.</p>\n\n<p>Follow these steps for each repository, only including the appropriate users in the <code>passwd</code> file for each repository.</p>\n'}, {'answer_id': 81711, 'author': 'Matthew Schinckel', 'author_id': 188, 'author_profile': 'https://Stackoverflow.com/users/188', 'pm_score': 3, 'selected': False, 'text': "<p>You can use svn+ssh:, and then it's based on access control to the repository at the given location.</p>\n\n<p>This is how I host a project group repository at my uni, where I can't set up anything else.  Just having a directory that the group owns, and running svn-admin (or whatever it was) in there means that I didn't need to do any configuration.</p>\n"}, {'answer_id': 83418, 'author': 'VonC', 'author_id': 6309, 'author_profile': 'https://Stackoverflow.com/users/6309', 'pm_score': 5, 'selected': False, 'text': "<p>@Stephen Bailey </p>\n\n<p>To complete your answer, you can also delegate the user rights to the project manager, through a plain text file in your repository.</p>\n\n<p>To do that, you set up your SVN database with a default <code>authz</code> file containing the following:</p>\n\n<pre><code>###########################################################################\n# The content of this file always precedes the content of the\n# $REPOS/admin/acl_descriptions.txt file.\n# It describes the immutable permissions on main folders.\n###########################################################################\n[groups]\nsvnadmins = xxx,yyy,....\n\n[/]\n@svnadmins = rw\n* = r\n[/admin]\n@svnadmins = rw\n@projadmins = r\n* =\n\n[/admin/acl_descriptions.txt]\n@projadmins = rw\n</code></pre>\n\n<p>This default <code>authz</code> file authorizes the SVN administrators to modify a visible plain text file within your SVN repository, called <strong>'/admin/acl_descriptions.txt'</strong>, in which the SVN administrators or project managers will modify and register the users.</p>\n\n<p>Then you set up a pre-commit hook which will detect if the revision is composed of that file (and only that file). </p>\n\n<p>If it is, this hook's script will validate the content of your plain text file and check if each line is compliant with the SVN syntax.</p>\n\n<p>Then a post-commit hook will update the <code>\\conf\\authz</code> file with the <strong>concatenation</strong> of:</p>\n\n<ul>\n<li>the TEMPLATE <code>authz</code> file presented above</li>\n<li>the plain text file <code>/admin/acl_descriptions.txt</code></li>\n</ul>\n\n<p>The first iteration is done by the SVN administrator, who adds:</p>\n\n<pre><code>[groups]\nprojadmins = zzzz\n</code></pre>\n\n<p>He commits his modification, and that updates the <code>authz</code> file.</p>\n\n<p>Then the project manager 'zzzz' can add, remove or declare any group of users and any users he wants.\nHe commits the file and the <code>authz</code> file is updated.</p>\n\n<p><strong>That way, the SVN administrator does not have to individually manage any and all users for all SVN repositories</strong>.</p>\n"}, {'answer_id': 1793965, 'author': 'Chris Burgess', 'author_id': 43034, 'author_profile': 'https://Stackoverflow.com/users/43034', 'pm_score': 5, 'selected': False, 'text': "<p>One gotcha which caught me out:</p>\n\n<pre><code>[repos:/path/to/dir/] # this won't work\n</code></pre>\n\n<p>but</p>\n\n<pre><code>[repos:/path/to/dir]  # this is right\n</code></pre>\n\n<p>You need to not include a trailing slash on the directory, or you'll see 403 for the OPTIONS request.</p>\n"}, {'answer_id': 61511926, 'author': 'bahrep', 'author_id': 761095, 'author_profile': 'https://Stackoverflow.com/users/761095', 'pm_score': 0, 'selected': False, 'text': '<p>Apache Subversion supports <a href="https://www.visualsvn.com/support/svnbook/serverconfig/pathbasedauthz/" rel="nofollow noreferrer">path-based authorization</a> that helps you configure granular permissions for user and group accounts on paths in your repositories (files or directories). Path-based authorization supports three access levels - No Access, Read Only and Read / Write.</p>\n\n<p>Path-based authorization permissions are stored in per-repository or per-server authorization files with a special syntax. Here is an example from SVNBook:</p>\n\n<pre><code>[calc:/branches/calc/bug-142]\nharry = rw\nsally = r\n</code></pre>\n\n<p>When you require a complex permission structure with many paths and accounts you can benefit from a GUI-based permission management tools provided by VisualSVN Server:</p>\n\n<ul>\n<li>Server administrators can manage user and group permissions via the VisualSVN Server Manager console or PowerShell,</li>\n<li>Non-admin users can manage permissions via RepoCfg.</li>\n</ul>\n\n<p><em>Repository permissions in VisualSVN Server Manager</em>\n<a href="https://i.stack.imgur.com/XjoMn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XjoMn.png" alt="enter image description here"></a></p>\n\n<p><em>Repository permissions in PowerShell</em>\n<a href="https://i.stack.imgur.com/4DeLR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4DeLR.png" alt="enter image description here"></a></p>\n\n<p><em>Non-admin users can manage permissions via the RepoCfg tool</em>\n<a href="https://i.stack.imgur.com/RHPLJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RHPLJ.png" alt="enter image description here"></a></p>\n'}]
['https://Stackoverflow.com/questions/81361', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15425/']