1

Topic: Incorrect permissions causing logrotate to hang

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: CentOS release 6.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

I found that logrotate was hanging when run from cron.daily.  I would see this:

root     16003  0.0  0.0  19052   944 ?        Ss   03:01   0:00 /usr/sbin/anacron -s
root     16026  0.0  0.0 106060  1400 ?        SN   03:15   0:00  \_ /bin/bash /usr/bin/run-parts /etc/cron.daily
root     16416  0.0  0.0 105948   976 ?        SN   03:15   0:00      \_ awk -v progname=/etc/cron.daily/logrotate progname {?????   print progname ":\n"?????   progname="";????       }????       { print; }

I looked in /etc/cron.daily and logrotate did not have the proper permissions.  Once I fixed the permissions logrotate started running correctly.

Default:

-rwx------   1 root root  180 Oct  2 23:16 logrotate

Corrected:

-rwxr-xr-x   1 root root  180 Oct  2 23:16 logrotate

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Incorrect permissions causing logrotate to hang

/etc/cron.daily/logrotate is installed by package `logrotate`, default owner is 'root:root', permission '0700':

# rpm -ql logrotate
/etc/cron.daily/logrotate
...

# ls -l /etc/cron.daily/logrotate
-rwx------ 1 root root 180 Jul  9  2003 /etc/cron.daily/logrotate

3

Re: Incorrect permissions causing logrotate to hang

Yes, but with those permissions logrotate hangs.

4

Re: Incorrect permissions causing logrotate to hang

I suggest you report this issue to CentOS mailing list, because it looks like an issue/bug of this standard rpm package (logrotate).

5

Re: Incorrect permissions causing logrotate to hang

I'm just mentioning it here in case someone has the same issue and doesn't know where to look.