SFTP
status/error codes are a numerical codes that an SFTP server
1
uses to indicate a result of a client request (i.e. a request sent by WinSCP to the server).
WinSCP translates the numerical codes to a textual description for you, so you do not have to remember them.
The SFTP server should also provide a meaningful textual description of the error itself. WinSCP includes the server-side description in its error message, labeled “Error message from server”. Such description can include more detailed information than WinSCP can possibly deduce from the numerical code.
Note that not all servers use all codes. Most
SSH
/SFTP servers, including the most commonly used OpenSSH, support only SFTP version 3 that defines only codes
0
to
8
.
These servers would generally use code
4
(Failure) for many errors for which there is a specific code defined in the later versions of SFTP protocol, such as:
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.
In this case the server is required to provide meaningful description of the error itself (see above). Unfortunately, OpenSSH SFTP server uses always description
“Failure”
. Is such case, there is unfortunately no way to tell a reason of the failure.
Failure
An error occurred, but no specific error code exists to describe the failure. This error message should always have meaningful text in the
error message
field.
See
above
.
Bad message
A badly formatted packet or other SFTP protocol incompatibility was detected.
No connection
There is no connection to the server. This error may be used locally, but must not be return by a server.
WinSCP does not use the code.
Connection lost
The connection to the server was lost. This error may be used locally, but must not be return by a server.
WinSCP does not use the code.
Operation unsupported
An attempted operation could not be completed by the server because the server does not support the operation. It may be returned by the server if the server does not implement an operation.
Invalid handle
The handle value was invalid.
No such path
The file path does not exist or is invalid.
File already exists
The file already exists.
Write protect
The file is on read-only media, or the media is write protected.
No media
The requested operation cannot be completed because there is no media available in the drive.
No space on file-system
The requested operation cannot be completed because there is insufficient free space on the filesystem.
Quota exceeded
The operation cannot be completed because it would exceed the user’s storage quota.
Unknown principal
A principal referenced by the request (either the
owner
,
group
, or
who
field of an
ACL
), was unknown.
Lock conflict
The file could not be opened because it is locked by another process.
Directory not empty
The directory is not empty.
Not a directory
The specified file is not a directory.
Invalid filename
The filename is not valid.
Link loop
Too many symbolic links encountered or, an
SSH_FXF_NOFOLLOW
open encountered a symbolic link as the final component
Cannot delete
The file cannot be deleted. One possible reason is that the advisory read-only attribute-bit is set.
Invalid parameter
One of the parameters was out of range, or the parameters specified cannot be used together.
File is a directory
The specified file was a directory in a context where a directory cannot be used.
Range lock conflict
A read or write operation failed because another process’s mandatory byte-range lock overlaps with the request.
WinSCP does not use byte range locking.
Range lock refused
A request for a byte range lock was refused.
WinSCP does not use byte range locking.
Delete pending
An operation was attempted on a file for which a delete operation is pending.
File corrupt
The file is corrupt; an filesystem integrity check should be run.
Owner invalid
The principal specified can not be assigned as an owner of a file.
Group invalid
The principal specified can not be assigned as the primary group of a file.
No matching byte range lock
The requested operation could not be completed because the specified byte range lock has not been granted.
WinSCP does not use byte range locking.