[wp-trac] [WordPress Trac] #33480: After upgrade to 4.3 unable to update plugins.

WordPress Trac noreply at wordpress.org
Fri Aug 21 07:46:43 UTC 2015


#33480: After upgrade to 4.3 unable to update plugins.
-----------------------------+-----------------------------
 Reporter:  jobst            |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  4.3.1
Component:  Upgrade/Install  |     Version:  4.3
 Severity:  major            |  Resolution:
 Keywords:  needs-patch      |     Focuses:  administration
-----------------------------+-----------------------------

Comment (by dd32):

 I've duplicated this, and it turns out it some of my assumptions around
 this are wrong, mostly due to some weird PHP behaviour.

 This appears to come down to PHP's implementation of `is_writable()` not
 really being supported for stream wrappers - or rather, that the support
 is limited.

 PHP will fetch the owner / permissions of the file over the SSH2
 connection, but then base it's calculations of the current system user
 (nobody) rather than the ssh user in use for that `is_writable()` call.

 It seems to me, that there's two ways to fix this.
 a) Remove is_writable() support for SSH2 - It just plain doesn't work as
 expected.
 b) Implement is_writable() support in PHP - this is a option, but isn't
 really a viable long-term solution.

 For B, we'd have to evaluate the owner & permission values something
 similar to this: (And we don't know our groups, so can't evaluate those)
 `return $world_writable || ( $ssh_user == $file_owner && $writable_bits )`

 [attachment:33480.diff] implements option A.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33480#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list