Fix the chown and chgrp methods for the filesystem API's SSH2 transport. fixes #24277.
git-svn-id: http://core.svn.wordpress.org/trunk@24626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d53bd66ed
commit
51e89cca30
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue