I added two scripts in \"logrotate.d\" directory for my application logs to be rotated. This is the config for one of them:
{
compress
I have seen this issue with SELINUX disabled and this was because the parent directory of log file being rotated has global write-permission which is not welcomed by logrotate
error: skipping "/xxx/yyy/log/logfile.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
chmod the parent directory to 755 solved the issue
# logrotate --version
logrotate 3.8.6