OpenSUSE 11.4の最後の更新後、logrotateはmuninと機能しません。

OpenSUSE 11.4の最後の更新後、logrotateはmuninと機能しません。

OpenSUSE 11.4でmunin 1.4.5を使用しています。最近、一部の権限の問題を解決するためにlogrotateを更新した後、苦情が発生しました。

Mar  3 12:15:05 lucien logrotate: error: "/var/log/munin" has insecure permissions. It must be owned and be writable by root only to avoid security problems. Set the "su" directive in the config file to tell logrotate which user/group should be used for rotation.
Mar  3 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-html.log: Bad file descriptor
Mar  3 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-limits.log: Bad file descriptor
Mar  3 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-update.log: Bad file descriptor
Mar  3 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-graph.log: Bad file descriptor
Mar  3 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-node.log: Bad file descriptor

suだから、次のガイドラインを追加しました。/etc/logrotate.d/munin/etc/logrotate.d/munin-node

/var/log/munin/munin-html.log
/var/log/munin/munin-nagios.log
/var/log/munin/munin-limits.log
/var/log/munin/munin-update.log {
    su munin munin
    daily
    missingok
    rotate 7
    compress
    copytruncate
    notifempty
    create 640 munin munin
}
/var/log/munin/munin-graph.log {
    su munin www
    daily
    missingok
    rotate 7
    compress
    copytruncate
    notifempty
    create 660 munin www
}
/var/log/munin/munin-cgi-graph.log {
    su wwwrun munin
    daily
    missingok
    rotate 7
    compress
    copytruncate
    notifempty
    create 640 wwwrun www
}

/var/log/munin/munin-node.log {
    su munin munin
    daily
    missingok
    rotate 7
    compress
    copytruncate
    notifempty
    create 640 munin munin
}

今logrotateはもはや回転しません。

Mar  5 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-html.log: Bad file descriptor
Mar  5 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-limits.log: Bad file descriptor
Mar  5 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-update.log: Bad file descriptor
Mar  5 12:15:05 lucien logrotate: error: error reading /var/log/munin/munin-graph.log: Bad file descriptor
Mar  5 12:15:05 lucien logrotate: error: error setting owner of /var/log/munin/munin-cgi-graph.log-20120305: Operation not permitted
Mar  5 12:15:05 lucien logrotate: error: error opening /var/log/munin/munin-node.log: Permission denied

ls -laの一つ/var/log/munin/ここ

muninと再び動作するようにlogrotateを取得するにはどうすればよいですか?

ベストアンサー1

あなたの権限が混乱しています/var/log/muninそして設定ファイルにあります。ファイルには異なるユーザー/グループのペアがあり、構成にも異なるグループ/ペアがあります。

問題を解決するための2つのオプションがあります

  1. デフォルトルートの使用:root権限
  2. で指定みんな同じユーザー/グループのペアに対するmuninルール

まず、chownを使用して権限を再帰的にリセットできます。

chown -R USER:GROUP /var/log/munin

su ...次に、2番目の回避策を選択した場合は、すべての行を次の行に置き換える必要があります。

su USER GROUP

最初の回避策を選択した場合は、すべての行を完全に削除する必要がありますsu ...

おすすめ記事