hierynomus / hierynomus/sshj

ScpUploadClient does not allow rename in combination with sftpgo (but scp command does)

Open
#946 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.7k
Forks
620
Avg merge
3d 23h
Merged PRs (30d)
11

Description

Hi, I am using this library to scp files to remote. Up to now this worked without problem (e.g using openssh or bitvise on the remote side)

Now I try to use the same implementation with sftpgo (https://github.com/drakkan/sftpgo ) and the behaviour is weird:

If I copy e.g "test.txt" to "abc.txt", then this errors on remote as long as there is no folder "abc.txt" on the remote side. If I create such a folder on remote, then the file is copied to

./abc.txt/test.txt

So it looks like that sftpgo always threats the whole path as a folder structure. In combination with SSHJ it does not accept a "rename".

Maybe it's the fault of the remote implementation, but if I use openssh's scp client I can do the same experiment successfully.

But copy&rename a file using SCPUploadClient works, if remote is e.g openssh.

So currently I don't understand if there is implementation problem locally (SSHJ) or remotely (sftpgo) or maybe both.

Do you have any ideas? How can I track down the problem?

Btw, it is easy to set up a test instance of sftpgo by using docker and

docker run --name some-sftpgo -p 8080:8080 -p 2022:2022 -d "drakkan/sftpgo:latest"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.