Fix the chown and chgrp methods for the filesystem API's SSH2 transport. fixes #24277.
git-svn-id: https://develop.svn.wordpress.org/trunk@24626 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0fc3503f69
commit
381110d9f2
@ -184,8 +184,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
|||||||
if ( ! $this->exists($file) )
|
if ( ! $this->exists($file) )
|
||||||
return false;
|
return false;
|
||||||
if ( ! $recursive || ! $this->is_dir($file) )
|
if ( ! $recursive || ! $this->is_dir($file) )
|
||||||
return $this->run_command(sprintf('chgrp %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 %o %s', $mode, escapeshellarg($file)), true);
|
return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function chmod($file, $mode = false, $recursive = false) {
|
function chmod($file, $mode = false, $recursive = false) {
|
||||||
@ -210,8 +210,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
|||||||
if ( ! $this->exists($file) )
|
if ( ! $this->exists($file) )
|
||||||
return false;
|
return false;
|
||||||
if ( ! $recursive || ! $this->is_dir($file) )
|
if ( ! $recursive || ! $this->is_dir($file) )
|
||||||
return $this->run_command(sprintf('chown %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 %o %s', $mode, escapeshellarg($file)), true);
|
return $this->run_command(sprintf('chown -R %s %s', escapeshellarg($owner), escapeshellarg($file)), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function owner($file) {
|
function owner($file) {
|
||||||
|
Loading…
Reference in New Issue
Block a user