You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2014/10/29 11:53:33 UTC

[jira] [Commented] (SSHD-367) File Listing fails for SFTP Protocol version 4 and 5 when using org.apache.sshd.sftp.subsystem.SftpSubsystem

    [ https://issues.apache.org/jira/browse/SSHD-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188233#comment-14188233 ] 

Guillaume Nodet commented on SSHD-367:
--------------------------------------

Have you tried with org.apache.sshd.server.sftp.SftpSubsystem instead of org.apache.sshd.sftp.subsystem.SftpSubsystem ?
I'll fix it anyway, given there's a patch provided (thx a lot btw), but the experimental SftpSubsystem is way behind the simpler one in terms of stability afaik.

> File Listing fails for SFTP Protocol version 4 and 5 when using org.apache.sshd.sftp.subsystem.SftpSubsystem
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-367
>                 URL: https://issues.apache.org/jira/browse/SSHD-367
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.11.0
>            Reporter: Magesh Arul
>
> File listing with org.apache.sshd.sftp.subsystem.SftpSubsystem fails in WinSCP client as it uses SFTP protocol version 5 by default. 
> This is also mentioned in issue
> https://issues.apache.org/jira/browse/SSHD-325
> This could however be avoided by forcing WinSCP to use SFTP Protocol version 3.
> Cause of the issue :
> The problem here is in sending of the fIle atrributes back to the client.
> In org.apache.sshd.sftp.subsystem.SftpSubsystem, line 668
> Method sendName uses,
> int flags = SSH_FILEXFER_ATTR_PERMISSIONS | SSH_FILEXFER_ATTR_SIZE | SSH_FILEXFER_ATTR_ACCESSTIME;
> Whereas in org.apache.sshd.sftp.subsystem.Serializer.writeAttrs() Access time attribute is not added to the buffer. 
> This causes a decode issue on the client side.
> Fix :
> Remove flag SSH_FILEXFER_ATTR_ACCESSTIME as we are not writing it back to the client.
> In org.apache.sshd.sftp.subsystem.SftpSubsystem.sendName()
> line 668
> Change to 
> int flags = SSH_FILEXFER_ATTR_PERMISSIONS | SSH_FILEXFER_ATTR_SIZE;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)