SVN用户访问某些项目配置

发布于 2024-11-08 05:33:55 字数 1342 浏览 0 评论 0原文

我对 UNIX 系统完全陌生...已经玩了大约两周。 我已经成功安装了 subversion 并创建了一个存储库。

假设我们有用户:

internal_developer
external_developer_1
external_developer_2

我们有一个项目:

repositories/project1
repositories/project2
repositories/project3

我如何独立配置每个用户和项目的访问权限。

  1. Internal_developer - 可以访问所有项目 ( rw )
  2. external_developer_1 - 只能访问项目 1 ( rw )
  3. external_developer_2 - 只能访问项目 2 ( rw )

当我说“只能访问”时,这意味着他看不到存储库/*内容,只能看到他正在参与的项目。

我试图寻找一些手册或教程,我该如何做到这一点...但所有这些都是为比我更有经验的用户...


任何帮助表示赞赏。

- -

编辑。 (还不能回答我的问题)

文件 /etc/apache2/mods-available/dav_svn.conf

AuthUserFile 位置的

仅存储用户名和密码。然后

需要添加新行:AuthzSVNAccessFile /usr/passwd/svn.authz

然后是来自 Floyd 的语法^^。

我在这里查看: Subversion - 如何做当使用 SVNParentPath 时,我控制单个存储库的用户访问?

对于组,它看起来更像它。


不过,还剩下一个缺失的部分...无法配置管理员用户在访问 http://xxxxxx/svn 时查看所有存储库/

给出错误

禁止
您无权访问此服务器上的 /svn/ 。

即使我放入了 svn.authz:

[/]
@internal = rw

i'm completely new to the unix systems... been playing around about 2 weeks.
i've managed to install subversion and create a repositories.

lets say we have users:

internal_developer
external_developer_1
external_developer_2

we have a projects:

repositories/project1
repositories/project2
repositories/project3

how can i configure the access for each user and project independantly.

  1. internal_developer - can access all projects ( rw )
  2. external_developer_1 - can only access project1 ( rw )
  3. external_developer_2 - can only access project2 ( rw )

when i say "can only access" it means that he can not see the repositories/* content, only the projects he is working with.

i've tried to look for some manuals or tutorials how can i do this... but all of them are for more expierienced users then i am...


any help is appreciated.

---

Edit. ( can not yet answer my question )

in the file /etc/apache2/mods-available/dav_svn.conf

at the location of AuthUserFile stored only user names and passwords.

then

need to add new line: AuthzSVNAccessFile /usr/passwd/svn.authz

then there goes the syntax from Floyd ^^.

I looked here: Subversion - how do I control user access for single repository when SVNParentPath is used?

And with the groups it looks more like it.


Stil, one missing part left... can not configure the admin user to see all repositories when comes to http://xxxxxx/svn/

gives an error

Forbidden
You don't have permission to access /svn/ on this server.

even i puted in the svn.authz:

[/]
@internal = rw

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥抱影子 2024-11-15 05:33:55

如果您使用 Apache (Mod_Dav_Svn) 公开您的存储库,那么您需要将 Auth 支持添加到 apache conf 文件中的指令。

<location ...>
   ... 
   AuthType Basic
   AuthName "My Subversion repository"
   AuthUserFile /srv/svn/conf/passwd
</Location>

在 AuthUserFile 引用的文件中,您可以指定所需的权限,如下所示:

[/]
* =
[project1:/]
internal_developer = rw
external_developer_1 = 
external_developer_2 =
[project2:/]
internal_developer = rw
external_developer_1 =  rw
external_developer_2 =
[project2:/]
internal_developer = rw
external_developer_1 = 
external_developer_2 = rw

您还可以在每个文件夹的更细粒度级别如下

[/project1:/public_folder]
* = r

我希望这有帮助吗?

您可能还想考虑使用第三方来托管您的代码,CodeSpaces.com 进行具有精细权限的颠覆托管,而且您不必再为管理自己的基础设施、备份等而头疼……

If you using Apache (Mod_Dav_Svn) to expose your repository then you need to add Auth support to the Directive in your apache conf file

<location ...>
   ... 
   AuthType Basic
   AuthName "My Subversion repository"
   AuthUserFile /srv/svn/conf/passwd
</Location>

In the file referenced in the AuthUserFile you can specify the permissions you need like so:

[/]
* =
[project1:/]
internal_developer = rw
external_developer_1 = 
external_developer_2 =
[project2:/]
internal_developer = rw
external_developer_1 =  rw
external_developer_2 =
[project2:/]
internal_developer = rw
external_developer_1 = 
external_developer_2 = rw

You can also set permissions at a more granular level on a per folder basis as follows

[/project1:/public_folder]
* = r

I hope this helps?

You might also want to consider using a third party to host your code, CodeSpaces.com do subversion hosting that have granular permissions, plus you don't have the headache of managing your own infrastructure, backups, etc...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文