Make WordPress Core

Changeset 33883 for branches/4.3


Ignore:
Timestamp:
09/03/2015 04:05:45 AM (9 years ago)
Author:
dd32
Message:

WP_Filesystem: SSH2 handler: Remove support for is_writable() via SSH, it turns out PHP doesn't verify the writability via SFTP and instead uses a comparison based on the current php system process user instead of the ssh user.
This fixes the 'The update cannot be installed because we will be unable to copy some files.' error encountered during updates by skipping the write test completely.

Merges [33688] to the 4.3 branch.
Props jobst.
Fixes #33480 for 4.3

Location:
branches/4.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

  • branches/4.3/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r32726 r33883  
    384384     */
    385385    public function is_writable($file) {
    386         $file = ltrim($file, '/');
    387         return is_writable('ssh2.sftp://' . $this->sftp_link . '/' . $file);
     386        // PHP will base it's writable checks on system_user === file_owner, not ssh_user === file_owner
     387        return true;
    388388    }
    389389    /**
Note: See TracChangeset for help on using the changeset viewer.