Logrotate: logs are not rotating

How to fix the Logrotate error when logs are not rotating

Generally, if logs are not rotating with Logrotate the issues may be related to the file or directory permissions.

Set root ownership over log files

Ensure that the log files you're rotating are owned by the root user:

$ sudo chown root:root /etc/logrotate.d/my_log_file

Set correct log files permissions

Ensure that any log files you're rotating have at least 0644permissions:

$ sudo chmod 644 /etc/logrotate.d/my_log_file