Log file owner is root instead of webapp - Ruby 3 on Elastic Beanstalk on Amazon Linux 2

0

Hi,

Sometimes, after a deployment or it possibly may only happen after an AWS initiated instance replacement (seems that quite often a new instance is brought up to replace an instance), my log files are owned by root instead of webapp user.

The app is running as webapp so the log files do not get written to, as there is no permissions to do so.

No idea why this is happening. Any thoughts?

Rails 6 app, log files directory is /var/app/current/log/

For example:

[ec2-user@ip-172-31-32-66 log]$ ls -lrta
total 4
-rw-r--r--  1 webapp webapp    0 Nov  9 02:42 .keep
-rw-r--r--  1 root   root      0 Nov 12 18:41 production.log
drwxr-xr-x  2 webapp webapp   41 Nov 12 18:41 .
drwxr-xr-x 17 webapp webapp 4096 Nov 12 18:42 ..

Thanks.

ab
質問済み 1年前90ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ