简体   繁体   English

每个目录访问控制svn + apache:奇怪的权限问题(403 Forbidden error)

[英]svn+apache per directory access control: weird permissions issue (403 Forbidden error)

I had a perfectly working svn+apache install where I was using per directory access control to restrict access to various parts of the repository. 我有一个完美的svn + apache安装,我使用每个目录访问控制来限制对存储库各个部分的访问。 In particular, no one had access to the top level in the repository [/]. 特别是,没有人可以访问存储库中的顶级[/]。 People had access to folders like [/www] etc. I was specifying these permissions in a file (svn-access-file). 人们可以访问[/ www]等文件夹。我在文件(svn-access-file)中指定了这些权限。

I had to move to a new machine. 我不得不搬到新机器上。 So I installed subversion-1.6.3 and httpd-2.2.11 on it, and modified the conf file to mimic the conf file on the old machine (and I copied the svn-access-file and the svn-auth-file). 所以我在其上安装了subversion-1.6.3和httpd-2.2.11,并修改了conf文件以模仿旧机器上的conf文件(我复制了svn-access-file和svn-auth-file)。 Then I took an svn dump and did a load to put stuff back in the new repository. 然后我拿了一个svn转储并做了一个加载把东西放回新的存储库中。 Now I can check stuff out, modify stuff, and commit. 现在我可以检查出来,修改内容和提交。 However, as soon as I try to do an 'svn up' on an already checked out copy of some sub-folder [/www/people], I get the following error: 但是,只要我尝试在已经检出的某个子文件夹[/ www / people]的副本上执行'svn up',我就会收到以下错误:

svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'https://[servername]/svn'

It seems the problem is that it is trying to access the top level directory [/] even though really it should only be trying to access [/www]. 似乎问题是它试图访问顶级目录[/],即使它真的只应该尝试访问[/ www]。 If I temporarily give the user access to [/], it works. 如果我暂时让用户访问[/],它就可以了。

Can someone please tell me how to fix this? 有人可以告诉我如何解决这个问题吗? Everything worked on the old machine. 一切都在旧机器上工作。

Thanks! 谢谢! Gaurav 拉夫

Turns out this is a long standing bug in the subversion client. 事实证明这是subversion客户端中一个长期存在的错误。 Here's the bug report: 这是错误报告:

http://subversion.tigris.org/issues/show_bug.cgi?id=3242 http://subversion.tigris.org/issues/show_bug.cgi?id=3242

It will probably get fixed in the next major release - 1.7 In the meantime, here's a hack workaround: 它可能会在下一个主要版本中修复 - 1.7同时,这是一个黑客解决方法:

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2357123 http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2357123

I copied the 'if' statement into the source code for mod_authz_svn.c and rebuilt svn and it works now :) 我将'if'语句复制到mod_authz_svn.c的源代码中并重建了svn,它现在可以工作了:)

Here is also workaround I've found in the bug discussion. 这也是我在bug讨论中找到的解决方法。 If you have problems with updating local copy try to switch local copy to the same URL. 如果您在更新本地副本时遇到问题,请尝试将本地副本切换到同一URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM