ユーザ用ツール

サイト用ツール


logrotate

logrotate

ログローテーションツール。

ログローテーションの実行された日付をみる

Ubunut 18.04の場合

cat /var/lib/logrotate/status

デバッグモードで実行

/usr/sbin/logrotate -d /etc/logrotate.conf
/usr/sbin/logrotate -d /etc/logrotate.d/nginx

insecure permissions

以下のようなエラーメッセージが出る場合

because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

ローテートするディレクトリのパーミッションが775などグループに書き込み権限があると発生する。755にできない理由があればsuディレクティブでユーザとグループを指定する

logrotate.txt · 最終更新: 2019/02/07 06:53 by nullpon