Same-Sever Copy/Move on Debian 12 Broken
Steps to reproduce:
Create an SFTP (SSH) Session with WinSCP, mark any file or directory and copy it (by pressing the
Shift
key) to any other folder on the same server. This first copy procedure succeeds. Then repeat this step and try to overwrite the previously copied files. WinSCP now throws a generic "Error 4" message that can only be aborted.
The server console shows an error similar to:
sftp-server[1271334]: error: process_extended_copy_data: read failed: Is a directory
What I have tried
This malfunction occurs repeatedly and without exception on every server that is either upgraded to Debian 12 or has been installed with Debian 12.
My sshd-configuration is pretty much standard, except that I use password authentication. It is independent of the user account used.
In sshd.conf I tried both the internal and the external sftp subsystem, both behaved identically. However, If I don't use any sftp subsystem, the overwriting is working again. So I am puzzled: I expected that WinSCP would not be able to work at all without SFTP and without an FTP fallback available.So I acm curious, how does WinSCP manag file operations without SFTP? Is it using the older SCP protocol instead?
Another observation: When copying or moving a file does work, the original file creation date gets lost, it will be set to the current data. This worked on all Debian versions up to Debian 11, this malfunction was introduced with Debian 12.
It appears that the behavior of SFTP must have changed in Debian 12 but I can't find any hint in the change notes.
Any ideas how to fix this?