]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-filesystem-ssh2.php
Wordpress 3.6
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-filesystem-ssh2.php
index 3114456e097d4da0331f93c02be86d8ca761dae7..8ff3cb18e79f458b4dc800b45737a9924a9e9f6e 100644 (file)
@@ -184,8 +184,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
                if ( ! $this->exists($file) )
                        return false;
                if ( ! $recursive || ! $this->is_dir($file) )
-                       return $this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)), true);
-               return $this->run_command(sprintf('chgrp -R %o %s', $mode, escapeshellarg($file)), true);
+                       return $this->run_command(sprintf('chgrp %s %s', escapeshellarg($group), escapeshellarg($file)), true);
+               return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true);
        }
 
        function chmod($file, $mode = false, $recursive = false) {
@@ -210,8 +210,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
                if ( ! $this->exists($file) )
                        return false;
                if ( ! $recursive || ! $this->is_dir($file) )
-                       return $this->run_command(sprintf('chown %o %s', $mode, escapeshellarg($file)), true);
-               return $this->run_command(sprintf('chown -R %o %s', $mode, escapeshellarg($file)), true);
+                       return $this->run_command(sprintf('chown %s %s', escapeshellarg($owner), escapeshellarg($file)), true);
+               return $this->run_command(sprintf('chown -R %s %s', escapeshellarg($owner), escapeshellarg($file)), true);
        }
 
        function owner($file) {