4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSでWebSVNが動かなかったのはSELinuxの設定が原因だった

Last updated at Posted at 2015-08-21

現象

SVNサーバとは別のサーバにApache入れてWebSVNを立ち上げたが、正常に動作しない。
Apacheのerror_logには以下のような出力が出てた。

svn: E000013: Unable to connect to a repository at URL 'svn://218.219.151.16/home/svn/repos/claris'
svn: E000013: Can't connect to host '218.219.151.16': Permission denied

原因

どうやらSELinuxが有効化されているとhttpdのCGI経由でのネットワークアクセスが制限され、結果としてWebSVNのようなスクリプトが正常に動作しないらしい。

対処

そもそもCGIで他ホストに繋いで情報のやりとりを許すことにいろいろ問題あることは置いといて(イントラネット内のサービスなので目をつぶる)。

対応としてはSELinuxの設定で、httpd_can_network_connectをonにする。

現在の設定を確認
$ sudo getsebool httpd_can_network_connect
httpd_can_network_connect --> off

ONにする
$ sudo setsebool httpd_can_network_connect 1

設定を再度確認
$ sudo getsebool httpd_can_network_connect
httpd_can_network_connect --> on

これでWebSVNが動作するようになった。

参考

トラブルシューティングはCentOS 5におまかせ - @IT

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?