• On two of my sites, the firewall is not working and I have the message.

    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.

    After comparing several of my sites where the firewall was active, I realized that in those two sites my wp-content/wflogs/config.php file is missing. Not sure how to upload or reset the missing file.

    I tried to delete and then reinstall Wordfence, but it was still missing. How can I fix this problem? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi herringcreative,

    It seems the user the web server runs as doesn’t have write access to the wflogs folder.

    Can you check which user is the owner of the wflogs folder?
    – go to the wp-content folder
    – run the command: ls -al
    – check the owner/group and permissions for the wflogs folder

    Is it the same user the web server runs as?
    ps -aef|grep apache
    – in the output, the username is at the beginning of the line(s)

    If the above gives you 2 distinct users, permissions on the folder should be adjusted, or the owner should be changed to the web server related user.

    Let me know if this helps

    Thread Starter herringcreative

    (@herringcreative)

    yndmgo,

    The command Is -al didn’t work, I got an error saying it is not understood.

    I checked the permissions of the wflogs folder and it was 775. I rechecked each of the permissions of the files within the folders and found the .htaccess was 660 rather than 664. Once I changed that the config.php showed up on my hosting provider files, but not on my ftp program.

    @herringcreative

    Sorry I should’ve asked a few questions before starting to throw commands at you!

    How do you connect to the server hosting your WP site in order to see the files?
    – via ssh using putty, for example?
    – via an administration interface of your hosting provider?

    How do you check the files permissions?

    In case you connect via ssh, the commands I gave you should work.
    Just to be sure, in ls -al both “l” are lowercase “L” (the font on this page makes it look like capital “i”) and there is a space between “ls” and “-al”.

    What permissions do you see for the newly created config.php file? Maybe the FTP user you connect with doesn’t have sufficient access rights to view the file.

    Which owner/group do you see for the wflogs folder? In case you don’t have access to that information (using the ls -al command), you might want to check with your hosting provider that the owner:

    • is the user the web server runs as
    • OR

    • belongs to the same group as the user the web server runs as

    If there is any confusion, please let me know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Missing config.php in wflogs’ is closed to new replies.