使用 Apache 进行 Subversion 和权限问题
我已经通过 svnadmin create 命令和适当的虚拟主机配置设置了一个 SVN 存储库,以便与 Apache 2 一起使用。我发现,为了正确使用存储库,它必须由 wwwrun
用户(或 www
组)拥有或 chmodded 为 777
。
我想问是否可以明确告诉 Apache 在向特定路径(来自 vhost.conf)提供请求时模拟另一个用户,就像使用 suphp
扩展,所以创建存储库后,我不会弄乱权限。
先感谢您
I have setup an SVN repository for use with Apache 2 via svnadmin create
command and appropriate vhost configuration. I found that, in order to correctly use the repository, this must be owned by wwwrun
user (or www
group) or chmodded to 777
.
I would like to ask if it's possible to explicitly tell Apache to impersonate another user when serving requests to a certain path (from vhost.conf), like with suphp
extension, so I won't mess with permissions once I create a repository.
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要模拟另一个用户,apache 需要具有提升的权限 - 这会首先错过以有限权限运行 apache 的意义(如在示例中使用
wwwrun
)。因此,选择以下选项之一wwwrun
成为您授予访问权限的svnrepo
组的成员您的存储库suid
二进制文件和相应的 apache 模块,以允许 apache 模拟(非常复杂,容易搞乱 - 这就是 suphp 的做法)wwwrun
或www
组。坦率地说,我不认为您在第二个或最后一个选项中遇到了问题。为什么不允许
wwwrun
访问您的 svn 存储库?To impersonate another user, apache would need to have elevated privileges - this would miss the point of running apache with limited rights (as use
wwwrun
in your example) in the first place. Therefore, pick one of the followingwwwrun
member of thesvnrepo
group that you give access to your repository tosuid
binary and a corresponding apache module to allow apache to impersonate (very complicated, easy to mess up - that's how suphp does it)wwwrun
, or thewww
group.Quite frankly, I don't see the problem you're having with the second or last option. Why can't you allow
wwwrun
to access your svn repository?