function FileTransferSSH::chmodJailed

Overrides FileTransferChmodInterface::chmodJailed

File

includes/filetransfer/ssh.inc, line 95

Class

FileTransferSSH
The SSH connection class for the update module.

Code

function chmodJailed($path, $mode, $recursive) {
    $cmd = sprintf("chmod %s%o %s", $recursive ? '-R ' : '', $mode, escapeshellarg($path));
    if (@(!ssh2_exec($this->connection, $cmd))) {
        throw new FileTransferException('Cannot change permissions of @path.', NULL, array(
            '@path' => $path,
        ));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.