SVN server permission group management for multiple projects, svn server permission Group

Source: Internet
Author: User

SVN server permission group management for multiple projects, svn server permission Group

1. Create two code repositories

Cd/home/svn
Svnadmin create project1
Svnadmin create project2

2. Copy the authz passwd files to the SVN folder.

Cp authz passwd/home/svn

3. Modify the svnserve. conf file under project1 and project2.

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.

 

4. Modify two permission management files

Vi passwd
// Username = Password
[Users]
Eg1 = 123

Eg2 = 123

 

Vi authz

[Groups] // Group
Admin = eg1, eg2

[Project1: //] // access control of Project 1, which is inaccessible to guest1 and 2
@ Admin = rw
Or
Eg1 = rw
Eg2 = rw
[Project2:/]
@Admin= Rw

 

5. Restart
Svnserve-d-r/home/svn

Stop command
Killall svnserve


How can I set multiple administrators in the SVN server to enable and disable access permissions for developers on the client?

There is a way to achieve this, but installation and configuration is troublesome.
The key to implementing your idea is to store the permission files of each SVN database separately, rather than the permissions of all versions of the database in the same permission file. In this way, the control permission of a permission file can only be opened to a SVN administrator.

Based on this idea, you can build an SVN server using SVN and Apache integration. in the location of svn in conf, svnparentpath is not used to point to the parent directory of each version database. Instead, svnpath is used to point to a version database, that is, a location is written for each version database, specify a separate permission file in each segment location. The user ID and password files can be unified. Then, you can use the share permission settings of the operating system to specify the corresponding administrator for each permission file, or even further, to create these permission files into a separate SVN library, each permission file is stored in a separate folder, the read and write permissions of each folder are set, and the post-commit hook of this library is set. When a commit operation is performed on these permission files, you can use the hook to automatically update the permission file on the server.

This process is a little complicated, but it can be implemented. If you do not understand it, you can continue to ask me.

Is there an enterprise-level SVN service system? Which requires hierarchical permission management for multiple projects

It depends on the permission settings on the SVN server. If the server is set to accessible to all anonymous users, users and passwords can be downloaded without being required, if the server is set to allow access by certain people, the user name and password are required.

Developers of open-source software usually set the SVN server to an anonymous user for downloading, but only developers can upload it. The SVN server within the company is usually set to only some people for downloading, some people can upload files. Few SVN servers can be set as anonymous users to download files, while anonymous users can also upload files. Although this can be set technically, few do this, this is because the contents may be messy when something is uploaded.
Hope to adopt

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.