Subversion Management Management Based on Apache User Permissions

xiaoxiao2021-03-06  20

Subversion Project and User Permission Configuration Guide:

1. Two ways of use of Subversion: 1, Apache site mode; 2, local command line mode. Of course, we can also access through the client, but it must also first establish the above two access interfaces.

Second, the first way to configure the Apache mode We need to install the Apache server program, and you need to install two models.

Block: MOD_DAV_SVN and MOD_AUTHZ_SVN They can find on the Subversion site, please find the link in the appendix. After installing all the required modules, we must edit the Apache configuration documentation, let

It loads the modules we have to use. In general, Apache's configuration file is httpd.conf

. Location is generally in the confiners in the Apache installation directory. And the module we generally put

In the modules subdirectory. We join: loadModule DAV_SVN_MODULE MODULE DAV_SVN_MODULE MODULES / MOD_DAV_SVN_MODULE MOD_DAV_SVN_MODULE MOD_SVN_MODULE MOD_AUTHZ_SVN.SO This, Apache can access the Subversion's warehouse.

Third, the release of the project in the Apache mode is first to establish a Subversion project, such as Svnadmin Create / Home / SVN / Projecta, add: DAV SVN SVNPATH / HOME / SVN / Projecta If you want to build multiple items, you can use another way of writing: DAV SVN SVNPATION / SVN / Home / SVN This is where the subdirectory in / home / svn directory can be used. Apache is handed over to Subversion

DAV destination. Users can access Subversion managed by browser or URL

.

Fourth, the permission management in the Apache mode First, let's create a user Robert. Since it is the first time you create a user, we must create a user password file at the same time: htpasswd -c Authfile Robert, you will prompt you for the user password and confirm the user password. Htpasswd program will

The user password is saved in the Authfile after the hash operation. When you create a second user, we

You don't have to enter the -c switch. Htpasswd Authfile Harry

If you want to delete a user, we can use the following instructions: htpasswd -d authfile harry, Harry is removed from the Authfile.

At this time, Subversion's permission management issues are transformed into Apache's permission management.

Question. We will aforementioned directory configuration to do some modifications: DAV svn SVNPath / home / svn / projectA AuthType Basic AuthName "Subversion projectA" AuthUserFile / home / svn / projectA / authfile Require valid-user In this way, Access to Projecta must provide the user and the correct password recorded in Authfile.

V. Group management in Apache mode Sometimes, we hope to make multiple developers as a group, use the group's way to

Project setting permissions. For example, the Projecta project is only a member of GroupA.

. Let's introduce your configuration method. Here, we have to use the features provided by Mod_Authz_svn. We

httpd.conf in modifying directory configuration to do it again: DAV svn SVNParentPath / home / svn / AuthzSVNAccessFile /home/svn/authz.conf AuthType Basic AuthName "Subversion projectA" AuthUserFile / home / svn / projectA / authfile Require Valid-user You can notice that another configuration file is used here: Authz.conf has a general structure as follows: [Groups] Everyone = Robert, Tommy, Songjy, Zhengyong, Orcus, Zhangq Groupa = Robert, ZHANGQ GroupB = Orcus, Tommy [Projecta: /] @Groupa = rw @everyone = r [Projectb: /] @everyone = r @Groupb = rw ok, I think everyone should have understood the management method based on group and project. :)

Appendix: 1. Get the latest installation package:

http://summersoft.fay.ar.us/pub/subversion/latest/whitebox-el-3/bin/

转载请注明原文地址:https://www.9cbs.com/read-39692.html

New Post(0)