Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #33480, comment 9


Ignore:
Timestamp:
08/21/2015 07:40:37 AM (10 years ago)
Author:
jobst
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33480, comment 9

    initial v1  
    1 It still is a permission problem:
    2 
    3 I have a file /SOMEPATH/wp-content/plugins/index.php
    4  - If I chmod that to 0640 I cannot write (below false)
    5  - If I chmod that to 0660 I CAN write (below true)
    6 
    7 {{{
    8  WP_Filesystem( array( 'hostname' => '127.0.0.1', 'username' => 'SOMEUSER', 'public_key' => '/PATH_TO_SOME_KEY.pub', 'private_key'=>'/PATH_TO_SOME_KEY.priv') );
    9  global $wp_filesystem;
    10  error_log(WP_PLUGIN_DIR . '/index.php');
    11  $rc = var_export($wp_filesystem);
    12  error_log($rc);
    13  $rc = $wp_filesystem->is_writable( WP_PLUGIN_DIR . '/index.php');
    14  error_log(">".$rc."<");
    15 }}}
    16 
    17 Gotta play some hockey, back in a couple of hours.
    18 
    19 Jobst
    20 
    21 
    22 
    23 Replying to [comment:6 dd32]:
    24 > > The real issue is $this->clear_destination uses "is_writable/is_writeable" which is a PHP function running in the context of the user running apache (nobody in the case above), so obviously the files are NOT writeable and never should be!
    25 >
    26 > The SSH2 code uses the `ssh2.sftp://` wrapper which directs the checks to happen on the remote filesystem via the SSH connection. PHP is then running the permission checks against SOMEUSER not nobody.
    27 >
    28 > The problem here is that the `ssh2.sftp://` wrapper appears to be malfunctioning and always returning false, probably due to `stat` failing over that link - most likely due to a bug in either libssh or the interpretation of the server permissions.
     1deleted, wrong