• Resolved Rand

    (@rand)


    When WordFence finds a suspicious file after a scan, the option to delete the file never works. It always reports “An invalid file was requested for deletion.” I can then go to the server via FTP and successfully delete the file.

    What causes this? There’s no point in having a delete file button if it can’t work. Is it a rights issue?

    I’ve seen others report this problem, but I’ve never seen a real answer. The file was not cached. I even renamed a suspect file via FTP, and the next scan flagged the renamed file. It still wouldn’t delete it via the plugin, but again I could successfully delete it via FTP. Surely there must be an answer other than manually deleting via FTP?

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @rand, thanks for getting in touch.

    In my experience, the delete file button does have issues when the permissions aren’t available for Wordfence to do the job itself. 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.

    Permissions on your WordPress site’s directories are recommended to be 755, and the process owner should be set to www-data in many configurations. If you’ve recently upgraded to PHP8, it could be worth seeing if this issue persists when rolling back to PHP7.4.

    Let me know what you find out,

    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘An invalid file was requested for deletion.’ is closed to new replies.