---
title: "always edit"
author: "komei"
date: "2007-10-12T18:48:19Z"
tags: ["Access", "SVN", "subversion"]
slug: "always-edit"
draft: false
lastmod: "2007-10-12T18:48:19Z"
id: 131516
url: "https://komei.iteye.com/blog/131516"
---

sudo /etc/init.d/apache2 restart  
sudo /etc/init.d/apache2 force-reload

gedit /etc/apache2/mods-enabled/dav\_svn.conf

sudo svnadmin create /svn

sudo htpasswd -cm /etc/apache2/passwd user\_name

#error::  
  Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName  
apache2: apr\_sockaddr\_info\_get() failed for komei-desktop  
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

komei:$apr1$b2mxt...$DRo65Pjaua7nu/jOFUgHZ/  
tech:$apr1$x8zft...$hUVE7KEI.VQXj66yz3EM1.

建立控制用户访问权限的文件svn-access-filename  
 \[svn1:/]               //这表示，仓库svn1的根目录下的访问权限  
 harry = rw             // svn1仓库harry用户具有读和写权限  
 sally = r               // svn1仓库sally用户具有读权限  
 \[svn2:/]               //svn2仓库根目录下的访问权限  
 harry = r               // harry用户在svn2仓库根目录下只有读权限  
 sally =               // sally用户在 svn2仓库根目录下无任何权限  
 \[svn2:/src]           //svn2仓库下src目录的访问权限  
 harry=rw             
 sally=r  
 \[/]                  // 这个表示在所有仓库的根目录下  
 * = r               // 这个表示对所有的用户都具有读权限  
 \[groups]               // 这个表示群组设置  
 svn1-developers = harry, sally           // 这个表示某群组里的成员  
 svn2-developers = sally  
 \[svn1:/]            
 @svn1-developers = rw       // 如果在前面加上@符号，则表示这是个群组权限设置  
   
然后修改httpd.conf配置：

DAV svn  
SVNParentPath /svn  
AuthType Basic  
AuthName “Subversion repository”  
AuthUserFile /svn-auth-filename （保存用户名和密码）  
Require valid-user  
AuthzSVNAccessFile /svn-access-filename（保存用户访问的权限策略）