• Resolved czav09

    (@czav09)


    Hi,

    Preamble:

    I rent a hosting who give me access to cpanel with a user “abc” (it’s only an example). Then I installed, some years ago, wordpress (with a admin user named “xxx”) and made a web page. Everything was ok until some weeks ago when my hosting blocked my account (and my web page) for sending spam. So I entered into my mysql and deactived all plugins, deleted all suspicius files (reported by hosting) and the re-actived my web page. I actived and updated all plugins but the wordfence plugin keep me showing a firewall error that says:

    “The Wordfence Web Application Firewall cannot run. The configuration files are corrupt or inaccessible by the web server, which is preventing the WAF from functioning. Please verify the web server has permission to access the configuration files. You may also try to rebuild the configuration file by clicking here. It will automatically resume normal operation when it is fixed.

    We were unable to write to ~/wp-content/wflogs/ which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.”

    I found the folder and checked her permissions and they were set to 755, and even set the permissions to files in it to 755 too but the error persist.

    I have tried some of the possibles solutions that I found on google but can couldn’t solve the problems. Then I deactived and removed the plugin (also manually deleted the “~/wp-content/wflogs/” folder) and then installed again but the folder wasn’t created so the problem persist.

    May I have some help?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @czav09

    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.

    Plugin Support wfphil

    (@wfphil)

    Hi @czav09,

    Since I haven’t heard back from you I am assuming that the instructions solved your issue so I am marking this topic as resolved.

    If however, for whatever reason, you are still experiencing this issue and it is not resolved please respond to the post, which moves it back up the queue, and mark this topic as “not resolved”.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems with Firewall’ is closed to new replies.