• Hello,

    I cannot turn on my firewall for some reason. There is a message at the top of my dashboard 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.”

    When I enter the “clicking here” link it just refreshes the page and nothing changes. When I click on “Enable Firewall” I get a popup saying “An error occurred while saving the configuration.”

    When doing the Diagnostics I see two errors in the Filesystem ability to read/write various files:

    1 – Checking if web server can read from ~/wp-content/wflogs – X File “wafRules.rules” does not exist

    2 – Checking if web server can read from ~/wp-content/wflogs – X File “wafRules.rules” does not exist

    Can anyone please help me to enable my Firewall and solve this issue? Many thanks in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @dnmdgj,

    Could you make sure that the wp-content/ directory is writable by the web server, at least during the setup process –you can make wp-content/ unwritable as long as wp-content/wflogs/ has been created and remains writable by the web server user.

    Have you tried deleting the wflogs/ directory? –it’ll be automatically recreated and populated when a visit occurs.

    Thread Starter dnmdgj

    (@dnmdgj)

    Thank you for your response.

    As far as I know the wp-content directory is writable. When I delete the wflogs folder it returns again when the site is visited, but still I cannot activate the firewall.

    Thread Starter dnmdgj

    (@dnmdgj)

    Also, side from the error in Diagnostics showing that the file “wafRules.rules” does not exist, there is now an addition problem too:

    Connectivity Ability to connect to the Wordfence servers and your own site.
    Connecting to Wordfence servers (http) OK
    Connecting to Wordfence servers (https) OK
    Connecting back to this site wp_remote_post() test back to this server failed! Response was: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received<br />

    Thank you for your help!

    Thread Starter dnmdgj

    (@dnmdgj)

    Any updates on this one please?

    wfyann

    (@wfyann)

    Hi @dnmdgj,

    Can you please list here the content of the wflogs folder? As well as the owner/permissions for each file?

    Regarding the Does the “cURL error” does the issue persist if you disable the SSL verification?

    • Go to the “Wordfence –> Tools –> Diagnostics” page
    • In the “Debugging Options” section (bottom of the page)
    • Uncheck the “Enable SSL Verification” option
    • Hit the “Save Changes” button
    Thread Starter dnmdgj

    (@dnmdgj)

    Hello, the cURL issue seems to be fixed now.

    In the wflogs folder there are the following files only:

    .htcaccess – 0.133kb
    attack-data.php – 0kb
    config.php – 0kb
    ips.php – 0kb
    rules.php – 0kb

    Thank you for your help!

    wfyann

    (@wfyann)

    Hi @dnmdgj,

    It’s possible your server can’t connect to our servers to get the rules that go into the “wafRules.rules” file.

    Have you tried deleting the “wflogs” folder again since you resolved the connection issue?

    That said, as this is the only file in that folder which doesn’t have a “.php” extension, it’s theoretically possible that your server is set to only allow specific file extensions or that it automatically changes permissions on files with uncommon extensions.

    Thread Starter dnmdgj

    (@dnmdgj)

    The wflogs folder permission is 775
    .htcaccess is 664
    attack-data.php is 660
    config.php is 660
    ips.php is 660
    rules.php is 664

    Do those seem incorrect?

    Hi @dnmdgj,

    Apologies for the delayed response.

    Yes, the permissions are all correct. Can you confirm that the owner of those files (and of the “wflogs” folder) is the user the web server runs as?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Firewall doesn’t work – file “wafRules.rules” does not exist !’ is closed to new replies.