[wp-trac] [WordPress Trac] #33480: After upgrade to 4.3 unable to update plugins.
WordPress Trac
noreply at wordpress.org
Fri Aug 21 12:01:28 UTC 2015
#33480: After upgrade to 4.3 unable to update plugins.
-------------------------------------+-----------------------------
Reporter: jobst | Owner: dd32
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.3.1
Component: Upgrade/Install | Version: 4.3
Severity: major | Resolution:
Keywords: needs-patch fixed-major | Focuses: administration
-------------------------------------+-----------------------------
Comment (by jobst):
I do not think it will be that tricky to "fix" this.
Note that I have "FS_METHOD" and everything else set in wp-config.php, so
below functions all use "class-wp-filesystem-ssh2.php"
I can get the owner:
{{{
$rc = $wp_filesystem->owner( WP_PLUGIN_DIR . '/index.php');
error_log("OWN >".$rc."<");
// 2015-08-21 21:46:24 OWN >1234<
}}}
The user/owner of the connection is in the array:
{{{
error_log($wp_filesystem->options['username']);
// SOMEUSER
}}}
I can get the mode of the file as well:
{{{
$rc = $wp_filesystem->getchmod( WP_PLUGIN_DIR . '/index.php');
errorlog("CHMOD >".$rc."<");
// 2015-08-21 21:46:24 CHMOD >644<
}}}
The only thing I cannot find YET is how to connect the username "SOMEUSER"
to the "UID 1234", I know you could use "php_posix" but not everyone would
have that installed.
If saving the integer UID of the user opening the ssh2 connection into
$wp_filesystem->options, you have a easy way to know that the file is
WRITEABLE.
Jobst
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33480#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list