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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则