I wonder if someone have seen the error message below. Thanks in advance.
logrotate -vvv -f /etc/logrotate.d/kaltura_apache
reading config file /etc/logrotate.d/kaltura_apache
reading config info for /opt/kaltura/log/kaltura_apache_errors.log
error: /etc/logrotate.d/kaltura_apache:12 unknown option ‘su’ – ignoring line
error: /etc/logrotate.d/kaltura_apache:12 unexpected text
reading config info for /opt/kaltura/log/kaltura_apache_access.log
error: /etc/logrotate.d/kaltura_apache:26 unknown option ‘su’ – ignoring line
error: /etc/logrotate.d/kaltura_apache:26 unexpected text
reading config info for /opt/kaltura/log/kaltura_apache_errors_ssl.log
error: /etc/logrotate.d/kaltura_apache:40 unknown option ‘su’ – ignoring line
error: /etc/logrotate.d/kaltura_apache:40 unexpected text
reading config info for /opt/kaltura/log/kaltura_apache_access_ssl.log
error: /etc/logrotate.d/kaltura_apache:54 unknown option ‘su’ – ignoring line
error: /etc/logrotate.d/kaltura_apache:54 unexpected text
Yes, this ‘error’ is a little misleading. It is just that the version of
logrotate on RHEL/CentOS 6 does not support the ‘su’ directive, whereas in
7, we must have it.
However, this should not cause it to return a value other than 0 when
reloading Apache and is therefore, probably not the problem.
What is the return code from the logrotate command? verify with:
echo $?
You can also comment out the lines with the ‘su’ directive in
/etc/logrotate.d/kaltura_apache just to reduce noise.
Logrotate 3.7.x and previous versions don’t support “su” option.
So that, you should comment out lines of “su” directive.
Or, you should install logrotate 3.8.0 or later version manually.
So, really, no need to upgrade logrotate manually [although it will work, I always recommend using the distros official packages whenever possible], this warning can just be ignored.