According to the SVN server build article under centOS6.4 in this blog, the SVN server can only manage one project. how can we achieve permission management and allocation for multiple members in different projects? 1. The development server is required to build the SVN server. it is impossible to manage only one project. do a good job of technical confidentiality by preventing developers from accessing the code in other projects. There are three code repositories: project1, project2, project3 & nbs
According to the article on SVN server construction under cent OS 6.4 in this blog, the SVN server can only manage one project. how can we achieve permission management and allocation for multiple members in different projects?
Requirement 1
The development server builds the SVN server, and it is impossible to manage only one project. how can developers who are not in the same project not access the code in other projects and keep the technology confidential.
The code repository has three repositories: project1, project2, and project3.
Assume there are 6 people: eg1, eg2, eg3, eg4, eg5, eg6
Eg1 and eg2 can only access project1;
Eg3 and eg4 can only access project2;
Eg5 and eg6 can only access project3;
Second implementation
In your repository path, assume it is/home/sv.
|
Cd/home/svn // create three code repositories svnadmin create project1svnadmin create project2svnadmin create project3 // Copy the two permission configuration files to the SVN // root path, manage all code repositories cd/projcet1/confcp authz passwd/home/svn // open the configuration file vi svnserve. conf |
To:
|
Anon-access = none // disable anonymous access auth-access = writepassword-db =/home/svn/passwd // use the password file authz-db =/home/svn/authzrealm = project1 // permission domain name, it is very important to write your project name |
Modify svnserve. conf of project2 respectively.
Same as above, the last row is written separately
|
Anon-access = none // disable anonymous access auth-access = writepassword-db =/home/svn/passwd // use the password file authz-db =/home/svn/authzrealm = project2 // permission domain name, it is very important to write your project name |
Modify svnserve. conf of project3 respectively.
Same as above, the last row is written separately
|
Anon-access = none // disable anonymous access auth-access = writepassword-db =/home/svn/passwd // use the password file authz-db =/home/svn/authzrealm = project3 // permission domain name, it is very important to write your project name |
Modify two permission management files:
Passwd
|
// Username = password [users] eg1 = 123eg2 = 123eg3 = 123eg4 = 123eg5 = 123eg6 = 123 |
Authz
|
[Groups] // group admin = eg1, eg2guest = eg3, eg4guset1 = eg5, eg6 [/] // The administrator has all read and write permissions * = @ admin = rw [project1: //] // access control for Project 1, guest1, 2 inaccessible @ admin = rw or eg1 = rweg2 = rw [project2: /] @ guest = rw or eg3 = rweg4 = rw [project3:/] @ guest1 = rw or eg5 = rweg6 = rw |
3 restart
Stop command
Actual test:
Each group member can only access their own projects and has no permission to view others' projects.
Only administrators can view all project