gantzm opened a new issue, #392:
URL: https://github.com/apache/mina-sshd/issues/392
### Version
2.10.0
### Bug description
I'm attempting to scp a file from a Dropbear instance. I don't have
permissions to copy the file. Dropbear reports permission denied, but that
failure is never reported up to the calling code.
### Actual behavior
The ScpHelper class logged this:
`receiveNextCmd - ACK=1: scp: /directory1/directory2/file.xml: Permission
denied`
But this error appears to get ignored and never reported back to my calling
code. I don't receive any calls to my instance of ScpTransferEventListener.
The call to download on the ScpClient just returns, no exceptions or anything.
When I look at the code in ScpHelper it appears to just log the error ACK
and continue on:
```
// NOTE: we rely on the fact that an SCP command does not start with an
ACK code
protected int receiveNextCmd() throws IOException {
int c = in.read();
if (c == -1) {
return c;
}
if (c == ScpAckInfo.OK) {
return c;
}
if ((c == ScpAckInfo.WARNING) || (c == ScpAckInfo.ERROR)) {
String line = ScpIoUtils.readLine(in, csIn, true);
if (log.isDebugEnabled()) {
log.debug("receiveNextCmd - ACK={}", new ScpAckInfo(c,
line));
}
}
return c;
}
```
### Expected behavior
I would expect this information to show up in the ScpAckInfo parameter of a
call to handleFileEventAckInfo. Or possibly an exception thrown to indicate a
failure.
### Relevant log output
```Shell
receiveNextCmd - ACK=1: scp: /directory1/directory2/file.xml: Permission
denied
```
### Other information
_No response_
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]