0

リポジトリの 1 つにのみアクセスできる svn サーバーに新しいユーザーを作成します。それが可能だ?

私のサーバーは debian スクイーズを実行しています。

4

2 に答える 2

3

svn authz ファイルを使用してパーミッションを設定できます。まず、アクセス制御ファイルを作成する必要があります。

sudo nano /etc/apache2/svn_access_control

ユーザーグループ

ユーザーのグループを作成し、それらをルールに使用できます。これは、角括弧内の特別な見出しの下で行います。

[groups]
mygroup = dave, mike

これにより、「dave」と「mike」が属する「mygroup」というグループが作成されます。

それでは、いくつかの例を見てみましょう。例

[groups]
team = bob, bill devteam = bob, barry, brett
[/]
@team = r bob = rw
[/wowapp/trunk]
@team = r @devteam = rw brenda = rw

この例では:

Created a group team which has two members; bob and bill.
Created another group, called devteam which has three members; bob, barry, brett.
In the root of the repository, I’ve given the group team read permissions.
Also, in the root, bob has read and write permissions.
In the trunk of wowapp, the group team has read permission.
Also, the devteam group has read and write permissions.
And another user, called brenda has read and write permissions.

追加する必要があるのは、Apache svn 構成ファイルの次の行です。

AuthzSVNAccessFile /etc/apache2/svn_access_control

ファイルは次のようになります。

<Location /svn>
  DAV svn
  SVNPath /home/svn

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd

  AuthzSVNAccessFile /etc/apache2/svn_access_control

  Require valid-user
</Location>

ファイルを保存し、Apache2 を再起動します。

sudo /etc/init.d/apache2 restart

これで、Apache2 を介した Subversion でアクセス制御が機能するはずです。

于 2012-09-26T14:16:01.643 に答える
-1

ディレクトリごとの認証済みアクセスについては、redbean bookのauth セクションを参照してください。

より簡単なものが必要な場合は、GUI を使用してuberSVNなどのアクセス許可を設定できます。

于 2012-05-21T08:17:57.680 に答える