[ 
https://issues.apache.org/jira/browse/SSHD-1147?focusedWorklogId=571735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-571735
 ]

ASF GitHub Bot logged work on SSHD-1147:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Mar/21 09:05
            Start Date: 25/Mar/21 09:05
    Worklog Time Spent: 10m 
      Work Description: gnodet commented on pull request #187:
URL: https://github.com/apache/mina-sshd/pull/187#issuecomment-806483693


   Looks good to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 571735)
    Time Spent: 20m  (was: 10m)

> SftpClient is not able to download file from proprietory SFTP servers (IBM) 
> with a one time download policy
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-1147
>                 URL: https://issues.apache.org/jira/browse/SSHD-1147
>             Project: MINA SSHD
>          Issue Type: Wish
>    Affects Versions: 2.5.1
>            Reporter: Alex D
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Some propretory SFTP servers support a so-called "one time download" policy 
> also known as Extractability Count.
> Current implementation of the input stream based read ofile operation 
> org.apache.sshd.client.subsystem.sftp.SftpClient::read(String path) uses 
> org.apache.sshd.client.subsystem.sftp.impl.SftpInputStreamAsync
> which performs 2 operations in its constructor:
> 1) Open remote file (SftpClient::open)
> 2) Calculate remote file size using file's handle obtained in 1)
> As a result the following error is produced on attempt to download a file 
> from IBMs SFTP:
> SFTP error (SSH_FX_FAILURE): The message [remote file path] is not 
> extractable!
> IBM specifically states that it's not their problem at all, and they are not 
> going to fix it.
> According to their flow described here:
> https://www.ibm.com/support/pages/node/1121475?lang=en
> "Any attempt from client to issue other SFTP operations like SSH_FXP_STAT 
> (reading attributes) makes server to validate extractability_count > 0.
> If found 0, download would be reported as "not extractable".
> Most likely it's possible to use SftpClient::openRemoteFileChannel and work 
> with the obtained FileChannel manually without any additional requests to 
> stat remote file size.
> Though it would be a cumbersome approach, as reading remote file in chunks 
> not knowing its size in this case will be far from optimal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to