[jsosug:00046] Re: コマンドラインからsetroubleshoot

Back to archive index

Nobuaki NASU n-nas****@tener*****
2008年 10月 31日 (金) 10:19:20 JST


那須@和歌山 と申します。皆様はじめまして。よろしくお願いいたします。
セキュアOS塾にて「sshのコマンドラインから〜」の質問をいたしました。

早速ご回答ありがとうございます。

なるほど、解決方法は「きちんとログを見よう! 」ということなのですね。
講義中では audit.log ということでしたが、そこはまぁ経験でカバー、ですね。
今回の例では、「ファイルだけだったらこっち、ディレクトリ全体だったらこっち」と
きちんと示してくれていますね。優しさを感じます。
でもこれがずっとログに出てると肥大化がすごそうですね(^^;)

コマンドだけでrelabelをして記憶してくれるのですね。
設定ファイルを修正しなくていいというのは、オッチャンなので新鮮です。


ありがとうございます。
色々時間を見付けて試してみます。



2008/10/30 21:12 Yuichi Nakamura <himai****@miomi*****>:
>
> 中村です。
> 昨日のセキュアOS塾にて、
> setroubleshootをコマンドラインから使う方法について質問がありました。
>
>
> SELinuxによるトラブルがあると、/var/log/messagesに
> ↓のようなログが記録されます。
>
> Oct 30 15:20:05 localhost setroubleshoot: SELinux is preventing the httpd from using potentially mislabeled files (/var/www/html/test). For complete SELinux messages. run sealert -l 9637cbb2-a059-4aee-8dbe-8eb376dbbb1b
>
>>  For complete SELinux messages. run sealert -l 9637cbb2-a059-4aee-8dbe-8eb376dbbb1b
> と書いてあるので、このコマンドを入れると、トラブルの要約と解決方法が出てきます。
>
> *結果例:
>
> # sealert -l 9637cbb2-a059-4aee-8dbe-8eb376dbbb1b
> 要約:
>
> SELinux is preventing the httpd from using potentially mislabeled files
> (/var/www/html/test).
>
> SELinux has denied httpd access to potentially mislabeled file(s)
> (/var/www/html/test). This means that SELinux will not allow httpd to use these
> files. It is common for users to edit files in their home directory or tmp
> directories and then move (mv) them to system directories. The problem is that
> the files end up with the wrong file context which confined applications are not
> allowed to access.
>
> アクセスを許可:
>
> If you want httpd to access this files, you need to relabel them using
> restorecon -v '/var/www/html/test'. You might want to relabel the entire
> directory using restorecon -R -v '/var/www/html'.
>
> <略>
>
> ↑の例だと、restorecon -R -v '/var/www/html'
> にて問題が解決すると書いてあります。
>
> --
> Yuichi Nakamura
>
> _______________________________________________
> Japan secure operating system users group
> users****@secur*****
> http://lists.sourceforge.jp/mailman/listinfo/jsosug-users
>

-- 
---< Nobuaki Nasu >--------------
Email: n-nas****@tener*****




Jsosug-users メーリングリストの案内
Back to archive index