[
https://issues.apache.org/jira/browse/SSHD-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet resolved SSHD-367.
----------------------------------
Resolution: Won't Fix
The ssh-sftp module is deprecated.
> 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)