• Hello,

    Getting the following message when trying to setup the firewall (which there should be a way to hide the annoying message that tells me to enable the firewall as it currently does not go away until I enable it):

    We were unable to write to /.../public/wp-content/wflogs/ which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.

    But it can write because that folder and all the files are there, WF created them just fine.

    I am using access control lists for my permissions and everything works great, but WF thinks it can’t write when it actually can.

    Thank you.

    https://wordpress.org/plugins/wordfence/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Hi Corey,

    We have a maintenance release coming out shortly where you can dismiss the setup message.

    Can you tell me more about how the ACLs are set up, so we can try to reproduce the issue?

    -Matt R

    Thread Starter Corey Worrell

    (@coreyw)

    Hi WFMattR,

    What is weird is that another site on our server did not have any problems here. So I’m not sure what is going on.

    Here is ls -l wp-content

    drwxrwxr-x+ 13 corey users 4096 Apr 14 15:32 plugins
    drwxrwxr-x+  5 corey users  100 Mar 15 13:24 mu-plugins
    drwxrwxr-x+  3 corey users   24 Mar 15 13:24 themes
    drwxrwxr-x+  2 corey users    6 Apr 14 15:32 upgrade
    drwxrwxr-x+  3 corey users   34 Mar 15 13:26 uploads
    drwxrwxr-x+  2 corey users  112 Apr 13 14:55 wflogs

    And getfacl wp-content/wflogs

    # file: wflogs
    # owner: corey
    # group: users
    user::rwx
    user:apache:rwx
    group::r-x
    group:users:rwx
    mask::rwx
    other::r-x
    default:user::rwx
    default:user:apache:rwx
    default:group::r-x
    default:group:users:rwx
    default:mask::rwx
    default:other::r-x

    Apache running as apache user of course. Core/plugin/theme updates and media uploads all work, and WF was able to put the files like I said into the wflogs directory, so I can’t see why it thinks it can’t write when accessing /wp-admin/admin.php?page=WordfenceWAF&wafAction=configureAutoPrepend

    Thank you!

    Plugin Author WFMattR

    (@wfmattr)

    Hi Corey,

    Can you check the permissions on the files in wp-content/wflogs/ compared between the working and non-working sites? Some of the files can be rewritten at times, and a couple are given r/w permission only for the user, but I’m not sure why the two sites may be different yet.

    -Matt R

    Hi Matt
    Hope I’m not breaching protocol by butting in here, but on my sites, I’ve got the permissions identical on two different sites (wp-content:775, wflogs:775, files within wflog: 664) and yet one site only is triggering the following 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.
    I’m not too up to speed on WP permisssions but this seems a little odd…
    Thanks
    Wayne

    Plugin Author WFMattR

    (@wfmattr)

    Hi Wayne,

    Those permissions should normally work. If you know where to find the error log for your site, there may be more details there. (On most hosts, if you can’t find the error log, you may still be able to enable it with WP_DEBUG. More details are here: Using WP_DEBUG. It’s best to only use this temporarily while troubleshooting.)

    If you still have trouble and need more details, you can make a new post using the form at the bottom of the Wordfence forum here. (The wordpress.org forum rules ask us to keep each person’s issues separate, and it also helps us keep track of open issues, so no one gets skipped in long posts.) Thanks!

    -Matt R

    Moved the site from one domain to another in another directory. Changed all the domain references using a find and replace on the .sql file BUT the filepath keeps referring to the old location when getting the same error

    We were unable to write to /var/www/html/~/public/wp-content/wflogs/ which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.

    Trying to find out where it gets the file path because it can’t e dynamic as it would see the new location of where it is currently instead of where it once was. I’m assuming there is a static filepath used when attempting to set up the WAF part. Also uninstalled, removed DB tables and reinstalled WF to no avail.

    I’m having the same problem…..did you ever figure out where it’s grabbing that static file path?

    and to clarify my issue… I used UpdraftPlus to clone a site to another. I had done it a few times before without issues but somehow this time it’s trying to write to the original /home/pathere of the original user and not the cloned site user.

    I can’t find any entries in the db that have the old account. Checking the box to delete data and tables on deactivation doesn’t fix it.

    Anyone have an idea?

    FYI I figured it out… Wordfence edits a hidden file .user.ini in public_html and hard codes the path there.

    grrrr

    get this, too. I never had more plugin-trouble than with wordfence. hope i can uninstall it without damage.

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

The topic ‘Web Application Firewall Says it can't write’ is closed to new replies.