Plugin Support
wfphil
(@wfphil)
Hi @driesplasman
If the permissions are correct then typically this situation will occur if the “user/group” owner is different on the Wordfence “wflogs” directory than the user WordPress is running as on your site.
If you check on the Wordfence “Diagnostics” tab on the Wordfence “Tools” page, you’ll see a section there called “PHP Environment” and in there a “Process Owner” will be specified. Make a note of the “Process Owner”.
You may need to ask your hosting provider for assistance for the next part.
If you click on the “wflogs” directory in an FTP client you may be able to see an owner that has “user/group” ownership for the “wflogs” directory. You may see numbers instead of the “Process Owner” shown on your Wordfence “Diagnostics” page. This doesn’t mean that the ownership is incorrect. If that happens then you can login to the server via a SSH (secure shell) command line utility. Check that the owner for the “user/group” is the same as the “Process Owner” from your Wordfence “Diagnostics” page.
If they are different then Wordfence can’t read and write correctly to the “wflogs” directory. This can occur if there is a server side cron job on the server that is set up to trigger “wp-cron.php” (WordPress scheduled tasks) via PHP. If this is the case, that server side cron job can be changed to run via cURL or WGET instead of directly via PHP. This will make WordPress cron run more like it was intended by WordPress developers, and it will prevent the “wflogs” directory files from getting the wrong “user/group” ownership.
Alternatively, you may also be able to fix this by accessing your site via FTP/SSH or your hosting control panel file manager and delete the Wordfence “wflogs” firewall directory located in the “wp-content” directory.
The “wflogs” directory will be automatically recreated when you load any page on your site. When you do this your Wordfence Firewall Status will be reset and will thus be in Learning mode. You will need to go to the Basic Firewall Options section on the All Options page and set the Firewall to Enabled and Protecting or run through the Learning mode process again as any custom whitelisted firewall parametersyou have saved will have been deleted. Please refer to the Learning Mode link below:
https://www.wordfence.com/help/firewall/learning-mode/