• Resolved deadparrotsoftware

    (@deadparrotsoftware)


    We run free version of Wordfence on 5 sites – 2 staging sites on a Centos Server running
    Plesk

    On our STAGING site, Wordfence update to 7.5.1 worked great.
    Also on 2 other sites. And one other staging site.

    BUT on 1 production site – which previously showed NO ERRORS when running a scan, or ANY other issues,
    and has NEVER had an issue the past 2 years – suddenly gave this error when we try an
    update (edited for security):

    Selected items were updated with errors:
    – Unable to update plugin ‘Wordfence7.4.141`’, details: PHP Warning: chmod(): Operation not permitted in [REDACTED]/wp-admin/includes/class-wp-filesystem-direct.php on line 173

    several hundred times.

    SOLUTION (for everyone’s edification):

    We discovered that SOMEHOW (in a previous update we think) that the
    owner and group
    of the Wordfence directory under plugins, AND ALL the files, had been changed
    to
    “root root”!

    Under Plesk the group is usually psacln the owner is site owner username

    Changing the Wordfence Dir and ALL files under wordfence back fixed ALL errors.

    Again we don’t know HOW root became both between last update and the latest, but it did.

    ALSO: the root root thing will also cause wordfence to give a “Scan Fail – Can not start sacn” error

    Hope others find this useful

    Sid

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

    (@wfadam)

    Hello @deadparrotsoftware and thanks for reaching out to us!

    It’s most likely from running cron or WP-CLI as root, so when the files were created for the update, root was the user creating them.

    We actually have seen other users do that from time to time. It can’t be done by a plugin alone, because if you’re not running as root, you can’t create files that are owned by root, Linux itself prevents that.

    Thanks for sharing that information with everyone!

Viewing 1 replies (of 1 total)
  • The topic ‘Update to 7.5.1 crashes with chmod error on Plesk’ is closed to new replies.