Show Table of Contents
5.2. 使用するログファイル
Red Hat Enterprise Linux 6 では、dbus および audit パッケージは、デフォルトのパッケージ選択から削除されなければ、デフォルトでインストールされます。setroubleshoot-server は Yum (
yum install setroubleshoot) でインストールする必要があります。
以下のような SELinux 拒否メッセージは、デフォルトで
/var/log/audit/audit.log に書き込まれます。
type=AVC msg=audit(1223024155.684:49): avc: denied { getattr } for pid=2000 comm="httpd" path="/var/www/html/file1" dev=dm-0 ino=399185 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:samba_share_t:s0 tclass=file
May 7 18:55:56 localhost setroubleshoot: SELinux is preventing httpd (httpd_t) "getattr" to /var/www/html/file1 (samba_share_t). For complete SELinux messages. run sealert -l de7e30d6-5488-466d-a606-92c9f40d316d
Red Hat Enterprise Linux 6 では、
setroubleshootd はすでに定期的なサービスとしては稼働していませんが、AVC メッセージの分析にはまだ使われています。必要に応じて sedispatch と seapplet の 2 つの新プログラムが setroubleshoot を開始する方法として作動します。sedispatch は監査サブシステムの一部として稼働し、AVC 拒否が起こると dbus 経由でメッセージを送信します。このメッセージは、setroubleshootd がすでに稼働中の場合は即座にそこに送信され、まだ稼働していない場合は setroubleshootd を開始します。seapplet はシステムのツールバーで稼働するツールで、setroubleshootd で dbus メッセージを待機し、吹き出し通知でユーザーが拒否を確認できるようにしています。
デーモンの自動開始
auditd および rsyslogd デーモンが起動時に自動的に開始するように設定するには、Linux root ユーザーで以下のコマンドを実行します。
~]#chkconfig --levels 2345 auditd on~]#chkconfig --levels 2345 rsyslog on
service service-name status コマンドを使って、サービスが稼働しているかをチェックします。以下に例を挙げます。
~]# service auditd status
auditd (pid 1318) is running...
上記のサービスが稼働していない場合 (
service-name is stopped)、Linux root ユーザーで service service-name start コマンドを使い、サービスを開始します。以下に例を挙げます。
~]# service auditd start
Starting auditd: [ OK ]

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.