drakkan / sftpgo

Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob
https://sftpgo.com
GNU Affero General Public License v3.0
9.44k stars 735 forks source link

[Bug]: Rsync error with a "sftp storage" #1805

Open fpcurie opened 1 week ago

fpcurie commented 1 week ago

⚠️ This issue respects the following points: ⚠️

Bug description

Hello,

I have configured 2 sftpgo servers.

My use case is a configuration on "sftp1" which is configured to have a "sftp storage" on sftp2. sftp command is ok. But rsync command return :

protocol version mismatch -- is your shell clean?
(see the rsync manpage for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(622) [sender=3.2.7]

On sftp1, logs are : {"level":"error","time":"2024-11-08T17:25:33.885","sender":"SSH","connection_id":"SSH_01f7aad1790be519acc00bb8a6c8394ab7f03447e46d2dc9a24480bf9c533345_1","message":"command failed: \"rsync\" args: [--server -vrze.iLsfxCIvu . /toto] user: efs_preprod err: command unsupported for this configuration"}

Both servers have "rsync" command added in "enabled_ssh_commands".

How can i resolve this problem ?

Thx in advance.

Steps to reproduce

  1. Configure a user on "sftp2" (with sftpgo serveur)
  2. Configure a user on "sftp1" which have a SFTP File system on "sftp2"
  3. Try a rsync on sftp1 (for example "rsync -rvz --progress ./test test@test.com:/test"

Expected behavior

Rsync command ok

SFTPGo version

2.6.2

Data provider

sftp

Installation method

Community RPM package

Configuration

Only changed allowed sftp command to add rsync

Relevant log output

No response

What are you using SFTPGo for?

Medium business

Additional info

No response

MichalisDBA commented 3 days ago

I had the same problem. I could not rsync from a client to a sftp backend server via sftpgo. Rsync works only with sftpgo having local filesystem as backend service.

https://docs.sftpgo.com/2.6/ssh/#ssh-commands

system commands work only on local filesystem