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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南