Since some time logrotate does not work reliably, every grommunio update corrupts the owner of /var/log/grommunio.
As a repair manually repair the owner of /var/log/grommunio.
This can be done with this command: chown nginx:root /var/log/grommunio
and then
restart logrotate: systemctl restart logrotate
.
To make sure that this is done automatically after an update, create the cron.d file /etc/cron.d/logrotate_failed
with content:
# 1 = minute (of hour) to activate [0-59]
# 2 = hour (of day) to activate [0-23]
# 3 = day-of-month (of month) to activate [1-31 ... 29,30,31 may not activate during all months]
# 4 = month (of year) to activate [1-12 or 3-letter names "Jan,Feb,Mar"]
# 5 = day-of-week [0-7 or 3-letter names "Mon,Tue,Wed"] 0 and 7 = Sunday
# minute hour day-of-month month day-of-week user command
#
# logrotate fails, the rights for /var/log/grommunio are wrong, correct the rights to nginx:root / www-data:root
# Open SuSE uses: nginx:root
45 23 * * * root /usr/bin/chown nginx:root /var/log/grommunio
#
# Debian uses: www-data:root
#45 23 * * * root /usr/bin/chown www-data:root /var/log/grommunio
#
This will set the owner for /var/log/grommunio correctly every night at 23:45.
I hope the developers of grommunio will fix this problem soon and my cron.d file will become unnecessary.
Please note, for the Community Editions, this is now outdated, please read: https://community.grommunio.com/d/1281-prepare-for-the-ews-grommunio-2023111-release/2