• Resolved ElviraKate

    (@elvirakate)


    I installed Wordfence a week or so ago onto two WordPress sites. One is behaving beautifully, the other isn’t. I can’t download rules for the firewall – if I try, it says this:No rules were updated. Please verify you have permissions to write to the /wp-content/wflogs directory.

    All permissions are exactly the same as in the site that works properly. The directory itself has permissions 0755.

    Incidentally, the site is being battered to bits by a Chinese bot. I’ve had to block the IP in CPanel since Wordfence doesn’t seem to have noticed!

    What can I do to fix this? Should I uninstall and reinstall or what?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @elvirakate,

    Is the owner of the /wp-content/wflogs directory the same as the user the web server runs as?

    Thread Starter ElviraKate

    (@elvirakate)

    Thank you for responding. I’m not exactly sure what you mean, but I own the websites and have full access to the server via CPanel where I am the only user. I have two WP sites both running WF, on the same (shared) server: folder structure and file permissions are identical on both, but somehow I cannot write to one of them even though the permissions say I can.

    Thread Starter ElviraKate

    (@elvirakate)

    OK, have been searching through the error log and have found this (suitably edited):

    failed to open stream: no suitable wrapper could be found in /home/mysite/public_html/santamaria.org/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php on line 409

    and later:

    wrapper is disabled in the server configuration by allow_url_fopen=0 in [the same URL as above]

    Does this mean Wordfence did not install properly? I transferred the settings from the working site using the facility within WF, could that have gone wrong somehow?

    Please help!

    @elvirakate,

    Thanks for providing this additional information.
    It actually suggests a different cause than the one I previously had in mind.

    Could you please go to the Wordfence System Info page:

    • Go to the Wordfence Tools page
    • Click the Diagnostics tab
    • In the Other Tests section (near the bottom of the page), click the link that reads “Click to view your system’s configuration in a new window“. This will open the Wordfence System Info page.

    And then compare both environments, in particular the following parameters:

    • Server API
    • Loaded Configuration File
    • PHP Version
    • cURL support
    • cURL Information
    Thread Starter ElviraKate

    (@elvirakate)

    OK, thanks very much for this, here we go:

    Server API: GoodSite: CGI/FastCGI; BadSite: the same
    Loaded Configuration File: GoodSite: /opt/alt/php70/etc; BadSite: /opt/cpanel/ea-php71/root/etc
    PHP Version: GoodSite: 7.0.17 BadSite: 7.1.3
    cURL Support: GoodSite: 7.36.0 BadSite: Fail
    cURL Information: can’t find this for either site.

    Lightbulb moment! I changed the PHP version to 7.0,17 and cURL Support appeared, and I was able to download the Firewall rules without problem.

    It just takes an expert to know where to look! Thank you HUGELY.

    with very best wishes
    Kate

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Permissions to write to wflogs’ is closed to new replies.