WordPress.org

Make WordPress Core

Changeset 24626


Ignore:
Timestamp:
07/10/13 04:15:13 (9 months ago)
Author:
nacin
Message:

Fix the chown and chgrp methods for the filesystem API's SSH2 transport. fixes #24277.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ssh2.php

    r18964 r24626  
    185185            return false; 
    186186        if ( ! $recursive || ! $this->is_dir($file) ) 
    187             return $this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)), true); 
    188         return $this->run_command(sprintf('chgrp -R %o %s', $mode, escapeshellarg($file)), true); 
     187            return $this->run_command(sprintf('chgrp %s %s', escapeshellarg($group), escapeshellarg($file)), true); 
     188        return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true); 
    189189    } 
    190190 
     
    211211            return false; 
    212212        if ( ! $recursive || ! $this->is_dir($file) ) 
    213             return $this->run_command(sprintf('chown %o %s', $mode, escapeshellarg($file)), true); 
    214         return $this->run_command(sprintf('chown -R %o %s', $mode, escapeshellarg($file)), true); 
     213            return $this->run_command(sprintf('chown %s %s', escapeshellarg($owner), escapeshellarg($file)), true); 
     214        return $this->run_command(sprintf('chown -R %s %s', escapeshellarg($owner), escapeshellarg($file)), true); 
    215215    } 
    216216 
Note: See TracChangeset for help on using the changeset viewer.