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. Props jobst. Fixes #33480 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@33688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
143c3e8a87
commit
466500743f
@ -383,8 +383,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
* @return bool
|
||||
*/
|
||||
public function is_writable($file) {
|
||||
$file = ltrim($file, '/');
|
||||
return is_writable('ssh2.sftp://' . $this->sftp_link . '/' . $file);
|
||||
// PHP will base it's writable checks on system_user === file_owner, not ssh_user === file_owner
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* @param string $file
|
||||
|
Loading…
Reference in New Issue
Block a user