'WinSCP error code 4 when uploading large file

I'm trying to move a file from my local machine to another machine into which I've SFTP-ed.

The file has 160MB. The transfer stops after a quarter of the file is moved over, with the following message:

Copying files to remote side failed
General Failure(server should provide error description)
Error code: 4
Error message from server: Failure



Solution 1:[1]

This may be because space is full on your server. Try executing df -Th command to see. Free space on your server and try again it works.

Solution 2:[2]

This would typically be due to a full file system on the server or exceeded user quota.

Actually a complete error message suggests that:

Common reasons for the Error code 4 are:

  • Renaming a file to a name of already existing file.
  • Creating a directory that already exists.
  • Moving a remote file to a different filesystem (HDD).
  • Uploading a file to a full filesystem (HDD).
  • Exceeding a user disk quota.

For details, see also WinSCP documentation on the SFTP code 4.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman
Solution 2