CentOS7.3でloglotateコマンドの実行時に、エラー"skipping /xxx because parent directory has insecure permissions"エラーが出る

カテゴリ: Linux | タグ:

loglotateコマンドを使ってログの切り替えを行うとき、以下のようにパーミッションのエラーが出る場合があります。

error: skipping "/var/log/foobar.log" 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.

この場合、logrotateの設定ファイルに"su USER GROUP"の定義を追加すると、このユーザ・グループでファイルを作ってくれます。

/var/log/foobar.log { 
  ...
  su apache apache
}

Amazonでおトクに買い物する方法
AmazonチャージでポイントGET


Amazonは買いもの前にAmazonギフト券をチャージしてポイントをゲットしないと損!

こちらもおススメ

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です