• Resolved Jola70

    (@jola70)


    Hello,

    I have read other posts on the forum regarding this issue. They have been marked resolved and closed, so I cannot add onto those.
    And I still have error:
    “Unable to open wp-content/wflogs/config.php for reading and writing”
    I use NGINX and WPCLI.
    I have disabled wp-cron in a wp-config.php file (wp-cron is run by curl).
    Permissions for wflofs folder: 775
    Permissions for config.php file: 660

    I’m not using the default user (www-data or root).
    I have created my own user.

    And…
    When I delete the wflogs directory, it is recreated with default user www-data (errors with ips.php and config.php).
    When I change user to myownuser everything is ok. No errors.
    But after few minuts (I think because of cron) user for config.php file is back to www-data. And errors start again.
    Why Wordfence change my own user for this file? Only for this file.
    How to fix it?

    Regards,
    Jolanta

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Jolanta,
    Could you please let me know which hosting provider you are using?

    Also, please go to (Wordfence > Tools => Diagnostics) and click on “Send Report by Email” button at the top of the page, you can send the report to “alaa [at] wordfence [dot] com”, make sure to include your forum username, I will take a look at this report and let you know my findings.

    Thanks.

    Thread Starter Jola70

    (@jola70)

    Hi,

    I use VPS from Contabo.com.

    “Email Diagnostic Report
    Diagnostic report has been sent successfully.”

    For now I have two files with user www-data in wflogs folder:
    config.php and attack-data.php

    Regards,
    Jolanta

    Hi Jolanta,
    While writing to the firewall files, we use “atomic writing” method, so every time the plugin writes to one of these files a new file is created replacing the old one. That newly created file has the default server’s user ownership.
    It’s recommended to add your custom user to the group that owns these files, this should fix this issue as these files will be group-writable.

    Thanks.

    Thread Starter Jola70

    (@jola70)

    Hi,

    It looks like it’s ok.
    It works. Thx.

    Regards,
    Jolanta

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to open wp-content/wflogs/config.php for reading and writing’ is closed to new replies.