SVN错误403禁止

时间:2010-03-26 15:26:18

标签: linux svn

我无法弄清楚这一点。我尝试从Netbeans将新项目导入svn存储库并获取403 Forbidden。我今天刚刚在我的服务器上设置了svn。我可以通过浏览器很好地实现它,虽然它是空的,因为我还没有导入我的项目。

Apache的html文件路径是/ var / www 我在/ var / svn

中设置了svn repo

这是/ var / svn

的结构
[root@localhost svn]# ls -lR /var/svn
/var/svn:
total 4
drwxrwxrwx 7 apache apache 4096 2010-03-26 10:18 repo

/var/svn/repo:
total 36
drwxrwxrwx 2 apache apache 4096 2010-03-26 09:47 conf
drwxrwxrwx 3 apache apache 4096 2010-03-26 10:18 dav
drwxrwsrwx 6 apache apache 4096 2010-03-26 11:19 db
-rwxrwxrwx 1 apache apache    2 2010-03-26 09:47 format
drwxrwxrwx 2 apache apache 4096 2010-03-26 09:47 hooks
drwxrwxrwx 2 apache apache 4096 2010-03-26 09:47 locks
-rwxrwxrwx 1 apache apache  229 2010-03-26 09:47 README.txt
-rwxrwxrwx 1 apache apache   15 2010-03-26 09:47 svnauth
-rwxrwxrwx 1 apache apache   43 2010-03-26 09:48 svnpass

/var/svn/repo/conf:
total 12
-rwxrwxrwx 1 apache apache 1080 2010-03-26 09:47 authz
-rwxrwxrwx 1 apache apache  309 2010-03-26 09:47 passwd
-rwxrwxrwx 1 apache apache 2279 2010-03-26 09:47 svnserve.conf

/var/svn/repo/dav:
total 4
drwxrwxrwx 2 apache apache 4096 2010-03-26 11:19 activities.d

/var/svn/repo/dav/activities.d:
total 0

/var/svn/repo/db:
total 48
-rwxrwxrwx 1 apache apache    2 2010-03-26 09:47 current
-rwxrwxrwx 1 apache apache   22 2010-03-26 09:47 format
-rwxrwxrwx 1 apache apache 1920 2010-03-26 09:47 fsfs.conf
-rwxrwxrwx 1 apache apache    5 2010-03-26 09:47 fs-type
-rwxrwxrwx 1 apache apache    2 2010-03-26 09:47 min-unpacked-rev
-rwxrwxrwx 1 apache apache 4096 2010-03-26 09:47 rep-cache.db
drwxrwsrwx 3 apache apache 4096 2010-03-26 09:47 revprops
drwxrwsrwx 3 apache apache 4096 2010-03-26 09:47 revs
drwxrwsrwx 2 apache apache 4096 2010-03-26 11:19 transactions
-rwxrwxrwx 1 apache apache    2 2010-03-26 11:19 txn-current
-rwxrwxrwx 1 apache apache    0 2010-03-26 09:47 txn-current-lock
drwxrwsrwx 2 apache apache 4096 2010-03-26 11:19 txn-protorevs
-rwxrwxrwx 1 apache apache   37 2010-03-26 09:47 uuid
-rwxrwxrwx 1 apache apache    0 2010-03-26 09:47 write-lock

/var/svn/repo/db/revprops:
total 4
drwxrwsrwx 2 apache apache 4096 2010-03-26 09:47 0

/var/svn/repo/db/revprops/0:
total 4
-rwxrwxrwx 1 apache apache 50 2010-03-26 09:47 0

/var/svn/repo/db/revs:
total 4
drwxrwsrwx 2 apache apache 4096 2010-03-26 09:47 0

/var/svn/repo/db/revs/0:
total 4
-rwxrwxrwx 1 apache apache 115 2010-03-26 09:47 0

/var/svn/repo/db/transactions:
total 0

/var/svn/repo/db/txn-protorevs:
total 0

/var/svn/repo/hooks:
total 36
-rwxrwxrwx 1 apache apache 1955 2010-03-26 09:47 post-commit.tmpl
-rwxrwxrwx 1 apache apache 1638 2010-03-26 09:47 post-lock.tmpl
-rwxrwxrwx 1 apache apache 2267 2010-03-26 09:47 post-revprop-change.tmpl
-rwxrwxrwx 1 apache apache 1567 2010-03-26 09:47 post-unlock.tmpl
-rwxrwxrwx 1 apache apache 3404 2010-03-26 09:47 pre-commit.tmpl
-rwxrwxrwx 1 apache apache 2410 2010-03-26 09:47 pre-lock.tmpl
-rwxrwxrwx 1 apache apache 2764 2010-03-26 09:47 pre-revprop-change.tmpl
-rwxrwxrwx 1 apache apache 2100 2010-03-26 09:47 pre-unlock.tmpl
-rwxrwxrwx 1 apache apache 2758 2010-03-26 09:47 start-commit.tmpl

/var/svn/repo/locks:
total 8
-rwxrwxrwx 1 apache apache 139 2010-03-26 09:47 db.lock
-rwxrwxrwx 1 apache apache 139 2010-03-26 09:47 db-logs.lock

我有httpd.conf加载svn.conf,其中包含:

<Location /svn>
DAV on
DAV svn
#SVNParentPath /var/svn
SVNPath /var/svn/repo
Authtype Basic
AuthName "Subversion"
AuthUserFile /var/svn/repo/svnpass
Require valid-user
AuthzSVNAccessFile /var/svn/repo/svnauth
</Location>

完整的错误消息是:

org.tigris.subversion.javahl.ClientException: RA layer request failed
Server sent unexpected return value (403 Forbidden) in response to CHECKOUT request for '/svn/!svn/bln/0'

的/ var / SVN /回购/ svnauth:

[root@localhost /]# cat /var/svn/repo/svnauth
[/]
user = rw

对于这篇令人难以置信的长篇文章感到抱歉,但我认为更多信息会比更少更好。我很长时间以来一直对这个问题感到烦恼。

1 个答案:

答案 0 :(得分:11)

我修好了。我没有考虑过,但mod_security正在阻止它。

我只需要添加

SecRule REQUEST_METHOD “^(PROPFIND|PROPPATCH)$” allow
SecRule REQUEST_METHOD “^(REPORT|OPTIONS)$” allow
SecRule REQUEST_METHOD “^(MKACTIVITY|CHECKOUT)$” allow
SecRule REQUEST_METHOD “^(PUT|DELETE|MERGE)$” allow

到modsecurity_crs_10_config.conf 然后重启httpd。一切都很好。

我希望这有助于某人。