I am new to logrotate on Linux machines ... here is what I installed in my application logrotate.d file:
/var/log/myapp.log {
daily
missingok
create 0660 root utmp
rotate 1
}
I set the owner rights to the myapp.log file for the account that launches the corresponding application using chmod directly from the bash shell.
when the application starts, everything is in order. These magazines are great and all is well. But when the log rotates, it deletes the log file, and then tries to recreate the log file, and it gives permission denied:
/bin/bash: /var/log/myapp.log: Permission denied
I know that I am doing something wrong with the logrotate or chmod configuration file or something like that ... can someone point me in the right direction and help me fix the problem?