Make WordPress Core

Ticket #24277: 24277.diff

File 24277.diff, 1.4 KB (added by nacin, 11 years ago)
  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    184184                if ( ! $this->exists($file) )
    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
    191191        function chmod($file, $mode = false, $recursive = false) {
     
    210210                if ( ! $this->exists($file) )
    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
    217217        function owner($file) {