3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

td-agentのpermissionとyum update nginxで失敗した話

Posted at

備忘のための失敗の記録

運用しているサービスの構成(の一部)

  • amazon linux
  • nginx (yumで入れた最新のもの
  • td-agent2 (amazon linuxサポートされて便利

nginxのログをtd-agent経由でs3に送る的なよくあるやつ。

素直にインストールしただけの状態だと、パーミッションの都合、td-agentがnginxのログに触れないので、読めるように設定してる。

$ ls -al /var/log/
drwxr-x---  2 nginx    td-agent    4096  9月 29 03:19 nginx

先日、nginxがアップデートされて何も考えないでyum updateしたら、/var/log/nginxがリセットされてしまった。

$ ls -al /var/log/
drwx------  2 nginx    nginx    4096  9月 29 03:19 nginx

これに気がつくまでの結構な間、アクセスログがとれない&Permission deniedがログにたんまり...

update内容はよく確認しましょう、というオチ。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?