• Resolved mtkalich

    (@mtkalich)


    Hi!
    I’m using Wordfence 7.1.8 (1530033614) on my WordPress website.
    In the list of the rules of the firewall there are “No rules currently set.”
    When I press “Manually refresh rules”, I get the message “Rule Update Failed: No rules were updated. Please verify you have permissions to write to the /wp-content/wflogs directory.”

    Diagnostics – Filesystem: everything is OK.
    MySQL: everything is OK.
    Connectivity: everything is OK.
    The folder /wp-content/wflogs has 775 permissions.
    Files attack-data.php, config.php and ips.php have 660 permissions; rules.php has 664; the file wafRules.rules didn’t exist, I created it with 775 permissions, but it changes automatically to 644. The owner of the folder and all the files is the web server.
    I tried to remove the folder /wp-content/wflogs, it is recreated with the same result (4 php files with 660 and 664 permissions, no wafRules.rules, “File “wafRules.rules” does not exist” error in Diagnostics – Filesystem, the same message when trying to update the rules manually).

    It seems to be the similar situation to https://www.ads-software.com/support/topic/cannot-update-rules/
    But I don’t know which “IP address used for the WF updates” should I check, and still there are no errors in Diagnostics – Connectivity…

    Is there any possibility to get wafRules.rules manually or solve the problem with automatic updates?

    Wordpress ver. 4.9.7
    PHP 7.0.22-1~dotdeb+8.1
    MySQL 10.0.30-MariaDB-0+deb8u2
    Server Debian 3.16.43-2+deb8u2 (2017-06-26)
    nginx/1.12.1

    • This topic was modified 6 years, 4 months ago by mtkalich.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @mtkalich,

    Could you please try removing /wp-content/wflogs again? After you do, instead of recreating the rules file, please go to Tools > Diagnostics, click on “Send Report by Email”, and send it to [email protected]. Please include your forum username in the Forum Username field.

    Once the report is sent, please copy any error messages you see or notices here as well.

    Thanks!

    Thread Starter mtkalich

    (@mtkalich)

    Hi @wfchar,

    by now the possibility to send emails via php is switched off.
    I think I can do it early next week.

    Thread Starter mtkalich

    (@mtkalich)

    Dear @wfchar,
    I’ve just sent the Email Report as you asked.
    The message was
    “Email Diagnostic Report
    Diagnostic report has been sent successfully.”

    The Diagnostic tab also has two error lines
    Checking if web server can read from ~/wp-content/wflogs
    File “wafRules.rules” does not exist
    Checking if web server can write to ~/wp-content/wflogs
    File “wafRules.rules” does not exist

    Thank you in advance!
    Michael

    • This reply was modified 6 years, 4 months ago by mtkalich.

    Hi Michael,

    Thanks for sending in the additional information. Can you confirm that the owner for the wflogs folder and the files in it are owned by the same user that’s in your WordPress path?

    Thanks!

    Thread Starter mtkalich

    (@mtkalich)

    Hi @wfchar,

    Exactly, the wflogs folder and the files in it are owned by the same user that’s our WordPress path.

    Hi Michael,

    Since it looks like everything is correct permissions-wise and we’re not seeing issues with communicating with our servers, we’re going to need to do the recreation process again with debugging enabled to try and better see what’s happening on your end. Before following these steps, please make sure that your server has PHP error logging enabled and that you have access to those logs, as I’ll need you to send them to me after.

    Here’s what I’d like you to do:

    1. Go to Tools > Diagnostics, scroll all the way down to Debugging Options, then check “Enable debugging mode”
    2. Make sure WordPress’s error logging is enabled. There is an example of how to do this under “Example wp-config.php for debugging” here
    3. Delete the wflogs folder
    4. Let wflogs be recreated by visiting any page as admin
    5. Check if wflogs was recreated properly (at this point we’re expecting .rules to still be missing/blank)
    6. Send the debug log generated by WordPress and the PHP error log from your server to [email protected]

    Thanks in advance, and I appreciate your patience with this process!

    Thread Starter mtkalich

    (@mtkalich)

    Dear @wfchar,
    I’ve sent the logs to [email protected].

    The messages related directly to the plugin say “curl_exec() has been disabled for security reasons”.

    Hi Michael,

    Thanks for the update!

    You’ll need to speak to your host or server administrator about curl_exec() being disabled, as that functionality is used by the firewall and is likely behind the rules not being generated. Once that has been re-enabled, you should be able to go through the regeneration routine and have wafRules.rules generate correctly.

    Please let me know how it goes with re-enabling and regenerating!

    • This reply was modified 6 years, 4 months ago by wfchar.

    Hi @mtkalich,
    Since we haven’t heard from you for a while I’m going to go ahead and resolve this thread. If you have any other questions or concerns, don’t hesitate to open a new one.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Rule Update Failed [Wordfence 7.1.8]’ is closed to new replies.