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.