diff --git a/src/Ssh/Sftp.php b/src/Ssh/Sftp.php index e19767c..b929287 100644 --- a/src/Ssh/Sftp.php +++ b/src/Ssh/Sftp.php @@ -238,6 +238,21 @@ public function listDirectory($directory, $recursive = false) ); } + /** + * Change the access permissions to file system objects + * + * @see http://php.net/manual/en/function.ssh2-sftp-chmod.php + * + * @param string $filename The filename to resolve + * @param int $mod The permissions on the new filename + * + * @return Boolean + */ + public function chmod($filename, $mod = 0600) + { + return ssh2_sftp_chmod($this->getResource(), $filename, $mod); + } + /** * {@inheritDoc} */