auto-creation of the log file

I enabled logging with default settings and file log route. Everything works fine, but when it's time to rotate logs, Yii creates new file application.log, with rights rw-r–r-- and group euser:psacln And when apache process wants to writ there, it gets error. Fix is to set rights rw-rw-r-- and group euser:psaserv. But I can't do it every time! It's fully acceptale if it creates log with apache:apache, then it has rw access to the file and I have root access, so it's not a problem.

So, question is:

  1. How to make logger create file with apache:apache or some defined group


  1. How to enable it simply rewrite the log file, I don't need history for the X days. One day is OK.


Guess this is related with your OS setting. Internally, Yii is using error_log() to save log messages to files.

You can set 'maxLogFiles' to be 1 so that only one log file is generated.

OK, will try with one log file and ask support to look into the issue on the server as well.