ラベル SELinux の投稿を表示しています。 すべての投稿を表示
ラベル SELinux の投稿を表示しています。 すべての投稿を表示

2014年5月16日金曜日

SELinux 「fatal: chdir /var/spool/postfix: Permission denied」 を解消する


「WordPressからメールが送信できないよ~」って問合せに調べてみたら、SELinuxがかかわっていたので、その対処法メモです。

2013年2月5日火曜日

Postfix + Cacti + SELinux 環境でグラフ生成を何とかする #SELinux


最近、SELinux関連の記事を投稿中の @snicker_jp です。

きっかけ

Postfixの状態をCactiにてグラフ化する時に、SELinuxにハマったので、またSELinuxネタを投稿します。


まずは、

前提条件


(Postfixが入っているサーバー)

  • RedHat EL6 系 (CentOS 6、SL6とか)
  • net-snmp-5.5-41.el6.x86_64
  • postfix-2.6.6-2.2.el6_1.x86_64
以下のパッケージは、コマンド群のために必要です。
  • postfix-perl-scripts-2.6.6-2.2.el6_1.x86_64
  • policycoreutils-python-2.0.83-19.24.el6.x86_64
  • setroubleshoot-server-3.0.47-2.el6.x86_64

2013年1月13日日曜日

Postfix + SELinux 環境でroot宛メールを何とかする #SELinux


最近、SELinuxと闘い続けている @snicker_jp です。

きっかけ

「そ~いえば、root宛メール来てないね~」で始まった、トラブル

調査

maillogを見てみると

Jan 10 16:16:01 hogehoge postfix/sendmail[20416]: warning: the Postfix sendmail command has set-uid root file permissions
Jan 10 16:16:01 hogehoge postfix/sendmail[20416]: warning: or the command is run from a set-uid root process
Jan 10 16:16:01 hogehoge postfix/sendmail[20416]: warning: the Postfix sendmail command must be installed without set-uid root file permissions

てログがちらほら・・・(´・ω・`)

ん?やっぱりトラブルなんじゃない?

ということで、検索してみました。

the command is run from a set-uid root process - Google 検索

2013年1月8日火曜日

Nagios (NRPE) + SELinux を何とかする



Nagios(NRPE)とSELinuxでつまずいたので、メモです。

前提条件

  • EPELのNRPE※1を入れている
  • SELinuxが「enforcing」になっている

この前提条件だと、NRPE経由でDiskを監視したら以下のようなメッセージが出ました。
DISK CRITICAL - /proc/fs/nfsd is not accessible:
調べたら、どうやらSELinuxが怪し───Σ(`Д´;)───ィ!みたい

結構、SELinuxをこういう時は無効に・・・とかってあると思いますが、戦ってみましたw

取り急ぎ、やったことを記します。
詳細な理由はあと。

解決


setenforce 0
ls -lZ /etc/rc.d/init.d/nrpe
chcon system_u:object_r:nagios_initrc_exec_t /etc/rc.d/init.d/nrpe
ls -lZ /usr/sbin/nrpe
chcon system_u:object_r:nrpe_exec_t /usr/sbin/nrpe
ls -lZ /etc/nagios/nrpe.cfg
chcon system_u:object_r:nrpe_etc_t /etc/nagios/nrpe.cfg
setenforce 1
getenforce


※1 NRPEとは
NRPE - Nagios Remote Plugin Executor

参考リンク:
SELinuxのお行儀を監視する――MRTG/Nagios編 - @IT
http://www.atmarkit.co.jp/fsecurity/rensai/selinux203/selinux02.html

共有