Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DrVanScott opened this issue May 27, 2024 · 0 comments

Comments

@DrVanScott
Copy link

DrVanScott commented May 27, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant