linux – SVN错误403禁止

前端之家收集整理的这篇文章主要介绍了linux – SVN错误403禁止前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我无法弄清楚这一点.我尝试从Netbeans将新项目导入svn存储库并获取403 Forbidden.我今天刚刚在我的服务器上设置了svn.我可以通过浏览器很好地实现它,虽然它是空的,因为我还没有导入我的项目. @H_301_2@Apache的html文件路径是/ var / www
我在/ var / svn中设置了svn repo

@H_301_2@这是/ 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
@H_301_2@我有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>
@H_301_2@完整的错误消息是:

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'
@H_301_2@在/ var / SVN /回购/ svnauth:

[root@localhost /]# cat /var/svn/repo/svnauth
[/]
user = rw
@H_301_2@对于这篇令人难以置信的长篇文章感到抱歉,但我认为更多信息会比更少更好.我很长时间以来一直对这个问题感到烦恼.

解决方法

我修好了它.我没有考虑过,但mod_security正在阻止它. @H_301_2@我只需要添加

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
@H_301_2@到modsecurity_crs_10_config.conf
然后重启httpd.一切都很好.

@H_301_2@我希望这可以帮助别人.

原文链接:https://www.f2er.com/linux/393070.html

猜你在找的Linux相关文章