• Resolved alsur

    (@alsur)


    Having a persistent error on debug logs although we believe wordfence is working correctly. Any help would be appreciated

    Backtrace from warning "chmod(): Operation not permitted"In home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php [line 443]<unknown file> <unknown line> calling process_error() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php 443 calling chmod() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php 431 calling _open() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php 610 calling open() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php 564 calling fetchConfigData() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php 1029 calling getConfig() | home/wp_faik_path/cont/plug/wordfence/vendor/wordfence/wf-waf/src/lib/request.php 268 calling rawPOSTBody() | home/wp_faik_path/cont/plug/wordfence/waf/bootstrap.php 46 calling createFromGlobals() | home/wp_faik_path/cont/plug/wordfence/waf/bootstrap.php 927 calling createFromGlobals() | home/wp_faik_path/cont/plug/wordfence/wordfence.php 107 calling require_once() | home/wp_faik_path/wp-settings.php 418 calling include_once() | home/wp_faik_path/multiblog/resources/vmb-init.php 41 calling require_once() | home/wp_faik_path/wp-config.php 103 calling require_once() | home/wp_faik_path/wp-load.php 50 calling require_once() | home/wp_faik_path/wp-blog-header.php 13 calling require_once() | home/wp_faik_path/index.php 17 calling require()

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @alsur,

    This does, from the error messages, look like either a permissions or file-locking issue on your site. Do you see any connectivity or permissions fail/error messages in your Wordfence > Tools > Diagnostics page? A specific area to check would be “Filesystem” near the top, but worth having a quick glance down the page just in case.

    It’s also worth checking that permissions on your WordPress site’s directories are 755, and that the process owner is www-data if appropriate for your setup. If you’ve recently upgraded to PHP8, it could be worth seeing if this persists when rolling back to PHP7.4.

    Once you’ve checked those, in your FTP or hosting file manager, navigate to your wp-content/wflogs folder. You should be able to delete the wflogs folder or its contents entirely and Wordfence should try to repopulate it within 30 minutes. If you have persistent problems with file-writing permissions, you can bypass Wordfence’s requirements entirely by setting logs to use the MySQLi storage engine: https://www.wordfence.com/help/firewall/mysqli-storage-engine/

    Thanks,

    Peter.

    Thread Starter alsur

    (@alsur)

    Hi, thanks for prompt feedback.
    Filesystem diagnostics all look ok.
    I deleted the wflogs directory and it was recreated, so I am uncertain if I should ignore the warning completely.

    Thanks.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @alsur,

    As warnings are non-fatal you could certainly try to continue running things as they are and see if you notice any issues going forward. If there appear to be no errors or problems in the running of Wordfence or the rest of your site then it may have been temporary.

    chmod will only work without sudo if the owner of the file is the same as the one running the command, so it could be an issue where the files are owned by root (for example) but Wordfence and other WordPress plugins will be trying to perform file operations as www-root. It could be worth reviewing this in your hosting file browser or via FTP and see whether you can change the owner.

    Thanks,

    Peter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Operation not permitted in storage/file.php’ is closed to new replies.