According to the article on SVN server Construction Under CentOS 6.4 in this article, 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 project1
Svnadmin create project2
Svnadmin create project3
// Copy the two permission configuration files to SVN
// Manage all code repositories in the root path
Cd/projcet1/conf
Cp authz passwd/home/svn
// Open the configuration file
Vi svnserve. conf
To:
Anon-access = none // prohibit Anonymous access
Auth-access = write
Password-db =/home/svn/passwd // use the password file in a unified manner
Authz-db =/home/svn/authz
Realm = 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 // prohibit Anonymous access
Auth-access = write
Password-db =/home/svn/passwd // use the password file in a unified manner
Authz-db =/home/svn/authz
Realm = 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 // prohibit Anonymous access
Auth-access = write
Password-db =/home/svn/passwd // use the password file in a unified manner
Authz-db =/home/svn/authz
Realm = project3 // permission domain name. It is very important to write your project name.
Modify two permission management files:
Passwd
// Username = Password
[Users]
Eg1 = 123
Eg2 = 123
Eg3 = 123
Eg4 = 123
Eg5 = 123
Eg6 = 123
Authz
[Groups] // Group
Admin = eg1, eg2
Guest = eg3, eg4
Guset1 = eg5, eg6
[/] // The Administrator has all the read and write permissions.
* =
@ Admin = rw
[Project1: //] // access control of Project 1, which is inaccessible to guest1 and 2
@ Admin = rw
Or
Eg1 = rw
Eg2 = rw
[Project2:/]
@ Guest = rw
Or
Eg3 = rw
Eg4 = rw
[Project3:/]
@ Guest1 = rw
Or
Eg5 = rw
Eg6 = rw
3 restart
Svnserve-d-r/home/svn
Stop command
Killall svnserve
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
Recommended reading:
Subversion configuration instances in Linux
CentOS 6.2 SVN setup (YUM installation)
Build an SVN server using Apache + SVN
Set up and use the SVN server in Windows + reset the password on the client
Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data
Build svn service and migration method on Ubuntu Server
Build SVN server with online storage