Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.5k views
in .NET FTP by (200 points)
This is the exception stack that I got:

EnterpriseDT.Net.Ftp.Ssh.SFTPException: Exception of type 'EnterpriseDT.Net.Ftp.Ssh.SFTPException' was thrown. (code=2)
at ae.d(String A_0)
at EnterpriseDT.Net.Ftp.Ssh.SSHFTPClient.ChDir(String dir)
at EnterpriseDT.Net.Ftp.FTPConnection.ChangeWorkingDirectory(String directory)

Would someone explain please what is the meaning of code=2?

Thank you.

4 Answers

0 votes
by (51.6k points)
I tried to reply to the e-mail that you sent us, but the message bounced. This is what I wrote:
Could you please send us a log-file with the logging level at ALL? The developer's guide has a couple of How-tos on enabling logging.


- Hans (EnterpriseDT)
0 votes
by (200 points)
Unfortunately we cannot reproduce the same issue (it happened on the production server).
We found out that the remote directory we were trying to change to, was removed from the ftp site.
Now it's back and the program functions with no issues.

But what we got from edtFTPnet was just an SFTPException with code=2. It would have been nice if we can get a preview of what's the meaning of the error codes.
If setting the logging level to ALL gives us that information, that would be ok, so we will know in a future event. Even then we have to recreate the issue in order to capture the real exception.
If not we would like to be able to diagnose the failure code somehow.

Thank you.
0 votes
by (162k points)
Yes, the SFTP reply codes aren't much help really. That's all the server sends back, so you have to go to the RFC to find out what the error is. We plan to make a fix that will map the codes to more sensible strings. In the meantime these are the codes:

       SSH_FX_OK                            0
       SSH_FX_EOF                           1
       SSH_FX_NO_SUCH_FILE                  2
       SSH_FX_PERMISSION_DENIED             3
       SSH_FX_FAILURE                       4
       SSH_FX_BAD_MESSAGE                   5
       SSH_FX_NO_CONNECTION                 6
       SSH_FX_CONNECTION_LOST               7
       SSH_FX_OP_UNSUPPORTED                8
       SSH_FX_INVALID_HANDLE                9
       SSH_FX_NO_SUCH_PATH                  10
       SSH_FX_FILE_ALREADY_EXISTS           11
       SSH_FX_WRITE_PROTECT                 12
       SSH_FX_NO_MEDIA                      13
       SSH_FX_NO_SPACE_ON_FILESYSTEM        14
       SSH_FX_QUOTA_EXCEEDED                15
       SSH_FX_UNKNOWN_PRINCIPAL             16
       SSH_FX_LOCK_CONFLICT                 17
       SSH_FX_DIR_NOT_EMPTY                 18
       SSH_FX_NOT_A_DIRECTORY               19
       SSH_FX_INVALID_FILENAME              20
       SSH_FX_LINK_LOOP                     21
       SSH_FX_CANNOT_DELETE                 22
       SSH_FX_INVALID_PARAMETER             23
       SSH_FX_FILE_IS_A_DIRECTORY           24
       SSH_FX_BYTE_RANGE_LOCK_CONFLICT      25
       SSH_FX_BYTE_RANGE_LOCK_REFUSED       26
       SSH_FX_DELETE_PENDING                27
       SSH_FX_FILE_CORRUPT                  28
0 votes
by (200 points)
This will help.
I appreciate it!
Thank you.

Categories

...