public function getPermissionCommands($path, $permissions = array('644', '755'), $isSudo = false, $isFile = null, $changeOwner = true)
    {
        if (is_string($path)) {
            $path = array_fill(0, 2, $path);
        }
        list($chmodPath, $chownPath) = $path;

        $commands = array();
        $commands[] = $this->getChmodCommand($chmodPath, $permissions, $isSudo, $isFile);

        if ($changeOwner) {
            $chown = $this->getChownCommand($chownPath, $isSudo, false);
            if (isset($chown)) {
                $commands[] = $chown;
            }
        }
        return implode(' ' . $this->combineOperator . ' ', $commands).';';
    }