Show Table of Contents
4.2. 使用するログファイル
Red Hat Enterprise Linux では、dbus および audit のパッケージは、デフォルトのパッケージ選択から削除されなければ、デフォルトでインストールされます。setroubleshoot-server は Yum (
yum install setroubleshoot-server コマンドを使用) を使用してインストールする必要があります。
auditd が実行中であれば、以下のような 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
さらに、以下のようなメッセージは
/var/log/message ファイルに書き込まれます。
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 7 では、
setroubleshootd はすでに定期的なサービスとしては稼働していませんが、AVC メッセージの分析にはまだ使われています。必要に応じて以下の 2 つのプログラムが setroubleshoot を開始する方法として作動します。
sedispatchユーティリティーは、auditサブシステムの一部として実行されます。AVC 拒否メッセージが返されると、sedispatchはdbusを使ってメッセージを送信します。これらのメッセージは、setroubleshootdが実行中であればそこに直接送られます。実行中でなければ、sedispatchがこれを自動的に開始します。seappletユーティリティーはシステムツールバーで実行され、setroubleshootd内の dbus メッセージを待機します。通知バブルを開始して、ユーザーが AVC メッセージを検討できるようにします。
手順4.1 デーモンの自動開始
auditdおよびrsyslogデーモンが起動時に自動的に開始するように設定するには、root ユーザーで以下のコマンドを実行します。~]#systemctl enable auditd.service~]#systemctl enable rsyslog.service- これらのデーモンが有効であることを確認するには、シェルプロンプトで次のコマンドを入力します。
~]$systemctl is-enabled auditdenabled~]$systemctl is-enabled rsyslogenabled別の方法では、systemctl status service-name.serviceコマンドを使ってenabledというキーワードをコマンド出力で検索します。例を示します。~]$systemctl status auditd.service | grep enabledauditd.service - Security Auditing Service Loaded: loaded (/usr/lib/systemd/system/auditd.service; enabled)

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.