Wondering how to resolve Plesk WordPress toolkit action log rotate failed on SELinux? We can help you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team help a customer deal with this query.
How to resolve Plesk WordPress toolkit action log rotate failed on SELinux?
WordPress Toolkit is a feature-rich management interface that allows anyone to install, configure, and manage WordPress websites.
WordPress Toolkit Deluxe, with tools such as Cloning and Smart Updates, is now included as part of cPanel.
Availability of these tools may need to be enabled by your hosting provider.
Typically, errors might look as shown below:
- On SELinux enabled server
/etc/cron.daily/logrotate
fail to rotate WordPress Toolkit action logs:error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/db05b569-01f4-4393-b30e-22f6ae72e091/db05b569-01f4-4393-b30e-22f6ae72e091.log failed: Permission denied
- In the system logs the following can be found:
SELinux is preventing /usr/sbin/logrotate from getattr access on the file /usr/local/psa/var/modules/wp-toolki
t/action_logs/4b6499f3-9efe-423f-91f2-b3a9f0fa3763/4b6499f3-9efe-423f-91f2-b3a9f0fa3763.log
Today, let us see the steps followed by our Support techs to resolve it:
- Firstly, connect to the server via SSH.
- Then, install
audit2allow
utility:For Debian/Ubuntu:apt-get install -y policycoreutils-python-utils
For Centos:
-
yum install -y policycoreutils policycoreutils-devel
- Generate the custom SELinux policy:
ausearch -c ‘logrotate’ –raw | audit2allow -M my-logrotate
# semodule -i my-logrotate.pp
- Firstly, create a text file
mylog.txt
with:type=AVC msg=audit(1633265286.201:716): avc: denied { getattr } for pid=16314 comm=”logrotate” path=”/usr/local/psa/var/modules/wp-toolkit/action_logs/d94c4998-63e0-406f-8e49-c45e896e1d2c/d94c4998-63e0-406f-8e49-c45e896e1d2c.log” dev=”sda1″ ino=25224436 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=file permissive=0
type=SYSCALL msg=audit(1633265286.201:716): arch=c000003e syscall=6 success=no exit=-13 a0=c8adc0 a1=7ffc33701310 a2=7ffc33701310 a3=2 items=0 ppid=16312 pid=16314 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=6 comm=”logrotate” exe=”/usr/sbin/logrotate” subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
type=PROCTITLE msg=audit(1633265286.201:716): proctitle=2F7573722F7362696E2F6C6F67726F74617465002D73002F7661722F6C69622F6C6F67726F746174652F6C6F67726F746174652E737461747573002F6574632F6C6F67726F746174652E636F6E66
- Then, generate and install the module:
cat mylog.txt | audit2allow -M my-logrotate
semodule -i my-logrotate.pp
[Looking for a solution to another query? We are just a click away.]
Conclusion
To sum up,today we saw steps followed by our Support Engineers to resolve Plesk WordPress toolkit action log rotate failed error.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments