SELinuxの拒否が止まらない

このQ&Aのポイント
  • SELinuxがmt.cgiへのアクセスを拒否し続けています。チンプンカンプンなので教えてください。
  • SELinuxはmt.cgiの要求したアクセスを拒否しています。現在のブール設定ではこのアクセスは許可されていません。
  • 制限されたプロセスは異なるアクセスを必要とするように設定できます。SELinuxは必要に応じてアクセスをオン/オフするためのブールを提供します。
回答を見る
  • ベストアンサー

SELinuxの拒否が止まらない。

SELinuxがこんなメッセージを表示し続けています。 わたしにはチンプンカンプンです。教え下さい。 httpdがmt.cgiを拒否してるようです。 SELinux is preventing mt.cgi (httpd_sys_script_t) "search" to ./lib (user_home_dir_t). \u8a73\u7d30\u8aac\u660e: SELinux denied access requested by mt.cgi. The current boolean settings do not allow this access. If you have not setup mt.cgi to require this access this may signal an intrusion attempt. If you do intend this access you need to change the booleans on this system to allow the access. \u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef: Confined processes can be configured to to run requiring different access, SELinux provides booleans to allow you to turn on/off access as needed. The boolean httpd_enable_homedirs is set incorrectly. Boolean Description: Allow httpd to read home directories

質問者が選んだベストアンサー

  • ベストアンサー
  • pakuti
  • ベストアンサー率50% (317/631)
回答No.1

SELinuxはセキュリティ用のモジュールです。 思想は高尚ですが中身はアレなので 実際に利用している環境は殆ど見たことがありません。 SELinuxを有効にしたままcgiを動かしたいのであれば 設定の変更が必要です。 http://park1.wakwak.com/~ima/centos4_apache0002.html http://netlog.jpn.org/r271-635/2008/01/apache_selinux_on_fedora_8.html 無難なのは無効にする事でしょう。 http://pocketstudio.jp/linux/?FC4%2FSELinux%2FSELinux%20%A4%F2%CC%B5%B8%FA%A4%CB%A4%B9%A4%EB%A4%CB%A4%CF%A1%A9

level2012
質問者

お礼

pakutiさんコメントありがとうございます。 まだまだ利用している方も少ない様ですので 無効にしたいと思います。 今後、アクセスが多いサーバーになってきたら、 上記の設定を挑戦したいと思います。 あとSELinuxが必要に動いてるときは、CPUの負荷率も高く、 夏場なのでびくびくしていました。 HPの13000円のサーバーですので、ファンも全快で気持ちいいです。

関連するQ&A

  • Are there foreigner?

    Are there foreigner in this site? If so, do you enjoy this site? Please let me know. It is uneasy to ask you a question in this site... This site may not allow to ask you a question in English.

  • ざっくりと和訳してください。

    Though I face a serious problem when I tryed to hone it. The razor is not straight and can't be honed properly. What do you sudgest to do for this problem?

  • 受診拒否?

    タイトル・Undelivered Mail Returned to Sender 本文・This is the Postfix program at host m-cb202p.ocn.ne.jp. I'm sorry to have to inform you that the message returned below could not be delivered to one or more destinations. For further assistance, please contact <support@ocn.ad.jp> If you do so, please include this problem report. You can delete your own text from the message returned below. The following sentences are Japanese. 知人にメールを送信したところ、このようなメールが届きました。 これは、メールアドレスそのものが無くなっているのでしょうか? それとも、私からのメールの受信拒否をされてしまったのでしょうか? 教えて下さい。 お願いいたします。

  • 翻訳してください

    Thank you for contacting Canada.ca. This email has been automatically generated to let you know that we have received your message. The Government of Canada privacy policies do not allow us to forward email messages on your behalf to any other Government of Canada organizations, programs, services or representatives. We do not respond to correspondence that contains offensive language.

  • SELinuxのポリシーを作るaudit2allowをインストールできませんか?

    Fedora12を使ってWebサーバを作りました。 SELinuxが有効になっています。 困っていること:ftp(vsftpd)接続でファイルがアップロードできない 症状:ftpユーザは、自分のホームより上へはアクセスできない設定にしました(chroot?) /homeの下に住んでいるユーザはftpで自由にファイルを上げられました WEBサーバを作ったので、/var/www/に直接ファイルを上げたいです。 そこで、ホームに/var/www/を指定して新しい専用ユーザを作成 ftp接続したところ、/var/www/のファイル一覧の取得とダウンロード(r)はできるものの、アップロードと削除(w)ができません。 SELinuxを止たところ読み書き全て正常に動きました。 SELinuxのログのみ出力するモードにしたところログも出ました。(内容は私には理解できません) そこでSELinuxが原因だと思っています。 ホームが、/home/以下のユーザを作った時は SELinuxのブーリアン値のftp_home_dirというのをonに設定することによって 読み書き可能になりました。この設定ってサーバ上の/home/以下のことを言っていて それ以外のところ(/var/www/以下とか)をホームに設定したユーザには効かないんでしょうか。 まずは、この辺で私が勘違いとかしていればご指摘いただけないでしょうか。 そして、この辺をon/offするような設定で/var/www/以下にftpアップロードできない場合は、 ちょっと面倒ですがSELinuxの監査ログから自分でポリシーを作るやつ audit2allowというプログラムがFedora10とFedora11を使った時には 入っていたのですが、今手元にあるFedora12のサーバには見当たりません。 名前が変わっているのか、入っていないのであればどうやって入れればよいのでしょうか。 できれば使い慣れたrpmっていうファイルで入れたいのですが、なんというパッケージに含まれているのでしょうか マニアックで難しい質問かとは思いますが、ご指導お願いいたします。

  • 訳してください

    You don't have permission to access /cgi-bin/hok_food/ibo.cgi on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request この意味判るかたいらしたら教えてください

  • apacheで「You don't have permission to access 」

    Nagiosというソフトをインストールしているのですが(Webベースで動く)、 http://localhost/nagios にアクセスすると、「You don't have permission to access /nagios/ on this server.」と出てしまいます。Apacheのhttpd.confは最後の行に、 ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin <Directory "/usr/local/nagios/sbin"> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> Alias /nagios /usr/local/nagios/share <Directory "/usr/local/nagios/share"> Options None AllowOverride AuthConfig Order allow,deny Allow from all </Directory> を加えて、以下も加えました。 <Directory /> Options FollowSymLinks AllowOverride Options </Directory> AddHandler cgi-script .cgi 何か原因は考えられるでしょうか?これだけではやはり、情報不足でしょうか?

  • TripodのCGI

    TripodでCGIを設置したんですが トップページからcgiへのリンクをクリックしても Forbidden You don't have permission to access /○○○/cgi-bin/sample.cgi on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. と表示されてしまいます。 マイアカウントでCGIの設定は済んでいます。

    • 締切済み
    • CGI
  • allow の後

    I don't allow you to do such a thing. I don't alllow doing such a thing. という例文がありました。どうしてこのようにallow to do にはならないのでしょうか?同じ意味なら不定詞を続けたほうがいいと思うのですが。

  • Fedora 10 での samba の複数の HDD の設定について

    ■ Fedora 10 での samba の複数の HDD の設定について [アクセス] windows XP ( Pro SP3 ) → Fedora 10 ※ PC 2台の HUB 接続 [samba のパッケージ] samba-3.2.4-0.22.fc10 ■ 質問内容 Fedora 10 の OS と同じパーティションでの samba とのアクセスは可能なのですが 別パーティションと別 HDD のアクセスが拒否されてしまいます。 同じパーティションなら Windows からのファイルの読み書きは 文字化けせずにアクセス可能です。 別パーティション ( 別 HDD ) に アクセスすると SELinux が AVC 拒否 と出ます ■ Fedora 10 のフォルダ構成とパーティションについて /home/user/folda1 ← アクセス可能 [同じパーティション] /folda2/folda2 ← アクセス不可 [別パーティション] /folda3/folda3 ← アクセス不可 [別 HDD ] ※ samba サーバーの設定は全て同じ ラベルを張り替えればアクセス可能だか何だかよく判らないのですが 端末で [ touch /.autorelabel; reboot ] してもアクセス出来ませんでした。 以下が SELinux が出したエラーです。 ※ 生の監査メッセージ 等は省いています よろしくお願いします。 ----------------------------------------------------------------------------- 要約: SELinux is preventing access to files with the default label, default_t. 詳細説明: SELinux permission checks on files labeled default_t are being denied. These files/directories have the default label on them. This can indicate a labeling problem, especially if the files being referred to are not top level directories. Any files/directories under standard system directories, /usr, /var. /dev, /tmp, ..., should not be labeled with the default label. The default label is for files/directories which do not have a label on a parent directory. So if you create a new directory in / you might legitimately get this label. アクセスを許可: If you want a confined domain to use these files you will probably need to relabel the file/directory with chcon. In some cases it is just easier to relabel the system, to relabel execute: "touch /.autorelabel; reboot" ソースコンテキスト system_u:system_r:smbd_t:s0 ターゲットコンテキストsystem_u:object_r:default_t:s0 ターゲットオブジェクト/ [ dir ] ソース smbd ソースパス /usr/sbin/smbd ポート <不明> ホスト linux ソース RPM パッケージ samba-3.2.4-0.22.fc10 ターゲット RPM パッケ filesystem-2.4.19-1.fc10 ポリシー RPM selinux-policy-3.5.13-18.fc10 Selinux 有効化 True ポリシータイプ targeted MLS 有効化 True 強制モード Enforcing プラグイン名 default ホスト名 linux プラットフォーム Linux linux 2.6.27.5-117.fc10.i686 #1 SMP Tue Nov 18 12:19:59 EST 2008 i686 i686