• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Plesk 17.8.8 Permission denied for logrotate cron

T

timscha

Guest
Hello,

Since upgrading from Preview 7 to 8 of Plesk 17.8 I got this error via mail:

/etc/cron.daily/logrotate:

error: error opening state file /var/lib/logrotate/logrotate.status: Permission denied
/etc/cron.daily/man-db.cron:

fopen: Permission denied


OS is CentOS 7. Any ideas to fix it?

Tim
 
What is output of

# stat /var/lib/logrotate/logrotate.status

?
 
[root@node06 tim]# stat /var/lib/logrotate/logrotate.status
File: ‘/var/lib/logrotate/logrotate.status’
Size: 1248 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 938730 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:eek:bject_r:unlabeled_t:s0
Access: 2017-09-15 14:14:18.699547976 +0200
Modify: 2017-09-15 14:14:18.748550671 +0200
Change: 2017-09-15 14:14:18.749550726 +0200
Birth: -
 
Make sure that you have the same output:

# cat /etc/cron.daily/logrotate
#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

# rpm -qf /etc/cron.daily/logrotate
logrotate-3.8.6-7.el7_2.x86_64

It's strange, but I have no this file on my server:

# ll /var/lib/logrotate/logrotate.status
ls: cannot access /var/lib/logrotate/logrotate.status: No such file or directory
 
The first output is a bit different:

#!/bin/sh

/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0


Also the installed logrotate version is different (logrotate-3.8.6-14.el7.x86_64). It tries a yum update, but have installed all updates.
 
Try to change /etc/cron.daily/logrotate according to my example. But it looks like OS issue but not Plesk.
 
Strange, cause I don't use own configs, only the ones provides by CentOS/Plesk.

I have changed the file and will see tomorrow, if I got the error again.
 
Back
Top