[horde] VFS SSH2 download problem

Jan Schneider jan at horde.org
Wed Oct 9 08:26:52 UTC 2013


Zitat von Steffen <skhorde at smail.inf.fh-bonn-rhein-sieg.de>:

> Hi,
>
> I've configured Gollem to use the SSH2 backend, with
>
> $backends['ssh2']['disabled'] = false;
> $backends['ssh2']['name'] = <host>;
> $backends['ssh2']['hordeauth'] = 'full';
> $backends['ssh2']['params']['hostspec'] = <host>;
> $backends['ssh2']['params']['timeout'] = 20;
>
> $backends['ssh2']['home'] = '/';
> $backends['ssh2']['params']['vfsroot'] =
>   '/home/'.$GLOBALS['registry']->getAuth();
>
> All operations seems to work, except "download", "edit" and the like.
> If I leave the parameters home and vfsroot unconfigured, the problem remains.
>
> When I try to download a file, Horde Vfs Ssh2 readStream() is  
> called, the generated URL looks OK:  
> ssh2.sftp://<user>:<pwd>@<host>:22/<path>//<file>
>
> but the Apache process surfing my request allocates 100% CPU and  
> endlessly calls recvfrom/sendto syscalls with data actually. The  
> file descriptor of the syscalls is the SSH connection.
>
> If I assemble a test PHP script like this:
>
>  $fp = fopen('ssh2.sftp://URL', 'r'); // The URL is a Copy'n'Paste from
> 	// the log generated by:
> 	//  
> Horde::log("Vfs::Ssh2::fopen(".$this->_wrap($this->_getPath($path,  
> $name)).")", 'ERR');
>
> while ($line = fgets($fp, 100)) {
> 	echo $line."<br />";
> }
> fclose($fp);
>
> I get the file successfully.
>
> If I comment out readStream() in /usr/share/php/Horde/Vfs/Ssh2.php  
> to force the use of readFile(), I can download files successfully.
>
> Can I do something to debug this issue further?

You can track this further down in Gollem_Application::download().
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list