• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Log rotation error

Fabian H

Basic Pleskian
I got the following mail the second time right now, how can I fix this?

Code:
/etc/cron.daily/logrotate:

error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/be90b96d-59f2-4e79-a72c-513a3dfd0040/be90b96d-59f2-4e79-a72c-513a3dfd0040.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/53e4ef0a-3699-4513-bbc2-3e57e812000b/53e4ef0a-3699-4513-bbc2-3e57e812000b.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/914e64ae-2461-41d0-a5f3-df06ac0bac58/914e64ae-2461-41d0-a5f3-df06ac0bac58.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/0f83e680-3d5b-499e-a08d-156f2003e2b1/0f83e680-3d5b-499e-a08d-156f2003e2b1.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/4c08a33a-0766-40d9-9ba1-1919eee65130/4c08a33a-0766-40d9-9ba1-1919eee65130.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/029db4c9-7ca2-4933-a492-de24da798520/029db4c9-7ca2-4933-a492-de24da798520.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/fb474169-d06a-4852-ba47-1bfad04cd2d7/fb474169-d06a-4852-ba47-1bfad04cd2d7.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/fd8c0bec-7b50-4ea0-a9ef-41cf5692c541/fd8c0bec-7b50-4ea0-a9ef-41cf5692c541.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/a2def9fe-35a8-4151-ba0e-55ceed1ef39a/a2def9fe-35a8-4151-ba0e-55ceed1ef39a.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/d80a478f-b1d0-4c22-a2b4-f0adb790bb9c/d80a478f-b1d0-4c22-a2b4-f0adb790bb9c.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/6eba387c-9263-4be7-8298-5bf89e916a3f/6eba387c-9263-4be7-8298-5bf89e916a3f.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/d33b7f9a-a33d-43c9-8c3e-56c1c50dce0e/d33b7f9a-a33d-43c9-8c3e-56c1c50dce0e.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/e8019f65-0f03-4372-be03-d78489785a22/e8019f65-0f03-4372-be03-d78489785a22.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/6f483673-fd0f-4123-aa3f-996d0ab79cca/6f483673-fd0f-4123-aa3f-996d0ab79cca.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/1362897e-2045-4b1d-b74c-692fadc8cb57/1362897e-2045-4b1d-b74c-692fadc8cb57.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/ca16736d-e7c1-4f9b-9da2-187e59342d97/ca16736d-e7c1-4f9b-9da2-187e59342d97.log failed: Permission denied
error: stat of /usr/local/psa/var/modules/wp-toolkit/action_logs/d607d551-556e-466a-81e7-5c1d144fb68b/d607d551-556e-466a-81e7-5c1d144fb68b.log failed: Permission denied

This is my logrotate conf:
Code:
[root@host ~]# 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 $EXITVALUE

And these are the permissions for the files:
Code:
[root@host ~]# ls -lisa /usr/local/psa/var/modules/wp-toolkit/action_logs/
total 76
5390368 4 drwxr-xr-x. 19 root   root   4096 Oct  1 04:48 .
5379920 4 drwxr-xr-x.  9 psaadm psaadm 4096 Oct  5 09:08 ..
5390375 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:43 029db4c9-7ca2-4933-a492-de24da798520
5390373 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:42 0f83e680-3d5b-499e-a08d-156f2003e2b1
5390383 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:46 1362897e-2045-4b1d-b74c-692fadc8cb57
5390374 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:42 4c08a33a-0766-40d9-9ba1-1919eee65130
5390371 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:42 53e4ef0a-3699-4513-bbc2-3e57e812000b
5390380 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:44 6eba387c-9263-4be7-8298-5bf89e916a3f
5390382 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:45 6f483673-fd0f-4123-aa3f-996d0ab79cca
5390372 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:42 914e64ae-2461-41d0-a5f3-df06ac0bac58
5390378 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:44 a2def9fe-35a8-4151-ba0e-55ceed1ef39a
5390370 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:41 be90b96d-59f2-4e79-a72c-513a3dfd0040
5390384 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:46 ca16736d-e7c1-4f9b-9da2-187e59342d97
5390369 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:45 d33b7f9a-a33d-43c9-8c3e-56c1c50dce0e
5390385 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:47 d607d551-556e-466a-81e7-5c1d144fb68b
5390379 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:44 d80a478f-b1d0-4c22-a2b4-f0adb790bb9c
5390381 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:45 e8019f65-0f03-4372-be03-d78489785a22
5390376 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:43 fb474169-d06a-4852-ba47-1bfad04cd2d7
5390377 4 drwxr-xr-x.  2 root   root   4096 Oct  5 04:43 fd8c0bec-7b50-4ea0-a9ef-41cf5692c541

Also, stat is working fine:
Code:
[root@host ~]# stat /usr/local/psa/var/modules/wp-toolkit/action_logs/be90b96d-59f2-4e79-a72c-513a3dfd0040/be90b96d-59f2-4e79-a72c-513a3dfd0040.log
  File: /usr/local/psa/var/modules/wp-toolkit/action_logs/be90b96d-59f2-4e79-a72c-513a3dfd0040/be90b96d-59f2-4e79-a72c-513a3dfd0040.log
  Size: 55105           Blocks: 112        IO Block: 4096   regular file
Device: 803h/2051d      Inode: 5379405     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:var_t:s0
Access: 2021-10-05 04:41:35.530000000 +0200
Modify: 2021-10-05 04:41:35.530000000 +0200
Change: 2021-10-05 04:41:35.530000000 +0200
 Birth: -

Any Ideas?
 
Back
Top