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
gefragt vor einem Jahr90 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen