SVN user group and user permission control

Source: Internet
Author: User
Svn is widely used as version control. But what if you configure svn to control the access permissions of every user? Today, I did not take the company's development server for a test step. The steps are as follows:

Svn is widely used as version control. But what if you configure svn to control the access permissions of every user? Today, I did not take the company's development server for a test step. The steps are as follows:

1. create a project:
Svnadmin create/opt/svn/data
Assume that project project_a/project_ B is in the/project_a directory and Project B directory of svn respectively.

2. modify the svnconf configuration.
Cd/opt/svn/data/conf
Vi svnserve. conf
Find: # anon-access = read
Remove the preceding comment and change read to none.
Even if: anon-access = none indicates that the user permission for anonymous logon is null. That is, the system does not support anonymous login.
Note:
Auth-access = write # Users who pass the verification can read and write (remove the # above)
Auno-access = read # read-only files can be logged on anonymously, that is, files cannot be submitted to the server after modification (remove the # at the front end and change it to anon-access = none)
Password-db = password # Name of the file saved by the user (remove the # above)
Authz-db = authz # permission management file is very important. if we want to assign permissions to the entire project file, we must comment out the row file, no, even if we do more configuration in the permission configuration file, it is invalid. (Remove the # above)

3. create a logon user name and password
Vi svnserve. conf
Add user_a \ user_ B \ user_c \ user_d under [users]. the password is 123456.
User_a = 123456
User_ B = 1, 123456
User_c = 123456
User_d = 123456

4. the key step is to assign permissions under the authz file.
A> Add user groups in [groups] and specify users. for example, add two user groups group_a/group_ B. group_a only has user_a, group_ B has user_ B/user_c, and group_c has user_d.
[Groups]
Group_a = user_a
Group_ B = user_ B, user_c
Group_c = user_d
B> set the directory access permissions for each user group (specific permission Description: Users in group_a can read and write project_a, while users in group_ B can access project_ B, users in group_c have read and write permissions on all projects)
[/Project_a]
@ Group_a = rw # indicates that the user in the group_a user group has the read and write permissions.
* = R # indicates that other users only have the read permission. if you want the code to prevent other users from downloading this item, you can remove it.
[/Project_ B]
@ Group_ B = rw
* = R
[/]
@ Group_c = rw

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.