Kaltura 14.2 all in one install RHEL 7.5 error: /etc/logrotate.d/kaltura_apache:12 unknown option 'su' -- ignoring line

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

1 /opt/kaltura/log/kaltura_apache_errors.log {
2 rotate 5
3 daily
4 missingok
5 compress
6 dateext
7 notifempty
8 sharedscripts
9 postrotate
10 service httpd reload
11 endscript
12 su root kaltura

Hello @astrava,

What version of logrotate is used by your Kaltura server?

You can check the version of your Kaltura server by using the following command:

# logrotate --version

if the version of logrotate package is 3.7.x or earlier, the cause of this problem may be the version of logrotate.

Regards

Thank you for your reply.

Installed Packages
Name : logrotate
Arch : x86_64
Version : 3.7.8
Release : 28.el6
Size : 87 k
Repo : installed

I have found answer on the forum.

jessp01 commented on Feb 20 2015

Hello,

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.

May the source be with you,

Jess Portnoy

Hello @astrava

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.

Regards

Hi @t-saito,

See my quoted response above:)

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.

Hello, @jess

Thank you for your kind instruction.:slightly_smiling_face:

Hello @t-saito,

Most welcome:) and thank you for helping other community members.

Thank you for you advice.