Logs owned by root.

Added by williamr 10 months ago

Greetings! I'm running into a small issue. Each night when ECM creates a new log file (instance/logs/ecm.log) the new log file is owned by root, and therefore cannot be opened by apache, and therefore causes a 500 error. I was curious as to which process actually creates the log file, and how I can ensure it creates it owned by www-data.

Thanks in advance!


Replies (2)

RE: Logs owned by root. - Added by diabeteman 10 months ago

I'm guessing that your update job is in root's crontab

*/5 * * * *     ecm-admin manage <instance> update --cron --silent

you should put it into apache's crontab or change it to

*/5 * * * *     su apache -c "ecm-admin manage <instance> update --cron --silent" 

RE: Logs owned by root. - Added by williamr 10 months ago

Yes, it is currently in the root crontab. I will modify the cron to su to www-data first. Thanks!!!

(1-2/2)