Code can connect to FTP site, but fails with an error when trying to call ChDir().
When calling ChDir() - we have started getting "OpenDirectory: No such file" and "ErrorCode|Status=2" a couple of lines before that in the logs.
Is this usually caused due to FTP server that we are trying to connect? Or Is there anything that can be done on FTP client code that is trying to call CHDir after connecting to the ftp site? Please help.
Here are the logs -
DEBUG [SSHFTPClient] 20 May 2022 13:13:39.818 : Connect() succeeded
DEBUG [SFTPMessage] 20 May 2022 13:13:39.834 : Send : Name=SSH_FXP_REALPATH,Type=16,RequestID=1
DEBUG [SSH2Channel] 20 May 2022 13:13:39.834 : Transmit 14 bytes
DEBUG [ChannelDataWindow] 20 May 2022 13:13:39.834 : Remote window size decreased to 2097129
DEBUG [PlainSocket] 20 May 2022 13:13:39.834 : Sent 64 bytes (NoDelay=True, SendBufferSize=131072, ReceiveBufferSize=131072)
DEBUG [SSH2Connection] 20 May 2022 13:13:39.834 : Packet written to socket
DEBUG [PlainSocket] 20 May 2022 13:13:39.865 : SSHSCPClient.1 Receive received 80 bytes
DEBUG [SSH2Connection] 20 May 2022 13:13:39.865 : SSHSCPClient.1 ProcessPacket pt=SSH_MSG_CHANNEL_DATA
DEBUG [SFTPMessageFactory] 20 May 2022 13:13:39.865 : SSHSCPClient.1 CreateMessage (bufferlength=36,offset=13,length=23,type=104)
DEBUG [SFTPMessage] 20 May 2022 13:13:39.881 : SSHSCPClient.1 SSH_FXP_NAME: requestID=1, 1 files
DEBUG [SFTPMessageStore] 20 May 2022 13:13:39.881 : SSHSCPClient.1 AddMessage(1) - added to store
DEBUG [SFTPMessage] 20 May 2022 13:13:39.881 : Reply : Name=SSH_FXP_NAME,Type=104,RequestID=1
DEBUG [SSHFTPClient] 20 May 2022 13:13:39.881 : ChDir(/inbound/a49)
DEBUG [SSHFTPClient] 20 May 2022 13:13:39.881 : ResolveRemotePath('/inbound/a49'); [cwd='/']
DEBUG [SSHFTPClient] 20 May 2022 13:13:39.881 : Resolved to '/inbound/a49'
DEBUG [SFTPMessage] 20 May 2022 13:13:39.881 : Send : Name=SSH_FXP_REALPATH,Type=16,RequestID=2
DEBUG [SSH2Channel] 20 May 2022 13:13:39.881 : Transmit 25 bytes
DEBUG [ChannelDataWindow] 20 May 2022 13:13:39.881 : Remote window size decreased to 2097104
DEBUG [PlainSocket] 20 May 2022 13:13:39.881 : Sent 80 bytes (NoDelay=True, SendBufferSize=131072, ReceiveBufferSize=131072)
DEBUG [SSH2Connection] 20 May 2022 13:13:39.881 : Packet written to socket
DEBUG [PlainSocket] 20 May 2022 13:13:39.912 : SSHSCPClient.1 Receive received 112 bytes
DEBUG [SSH2Connection] 20 May 2022 13:13:39.912 : SSHSCPClient.1 ProcessPacket pt=SSH_MSG_CHANNEL_DATA
DEBUG [SFTPMessageFactory] 20 May 2022 13:13:39.912 : SSHSCPClient.1 CreateMessage (bufferlength=58,offset=13,length=45,type=104)
DEBUG [SFTPMessage] 20 May 2022 13:13:39.912 : SSHSCPClient.1 SSH_FXP_NAME: requestID=2, 1 files
DEBUG [SFTPMessageStore] 20 May 2022 13:13:39.912 : SSHSCPClient.1 AddMessage(2) - added to store
DEBUG [SFTPMessage] 20 May 2022 13:13:39.912 : Reply : Name=SSH_FXP_NAME,Type=104,RequestID=2
DEBUG [SFTPSubsystem] 20 May 2022 13:13:39.912 : Opening directory /inbound/a49
DEBUG [SFTPMessage] 20 May 2022 13:13:39.912 : Send : Name=SSH_FXP_OPENDIR,Type=11,RequestID=3
DEBUG [SSH2Channel] 20 May 2022 13:13:39.912 : Transmit 25 bytes
DEBUG [ChannelDataWindow] 20 May 2022 13:13:39.912 : Remote window size decreased to 2097079
DEBUG [PlainSocket] 20 May 2022 13:13:39.912 : Sent 80 bytes (NoDelay=True, SendBufferSize=131072, ReceiveBufferSize=131072)
DEBUG [SSH2Connection] 20 May 2022 13:13:39.912 : Packet written to socket
DEBUG [PlainSocket] 20 May 2022 13:13:39.959 : SSHSCPClient.1 Receive received 64 bytes
DEBUG [SSH2Connection] 20 May 2022 13:13:39.959 : SSHSCPClient.1 ProcessPacket pt=SSH_MSG_CHANNEL_DATA
DEBUG [SFTPMessageFactory] 20 May 2022 13:13:39.959 : SSHSCPClient.1 CreateMessage (bufferlength=23,offset=13,length=10,type=102)
DEBUG [SFTPMessageStore] 20 May 2022 13:13:39.959 : SSHSCPClient.1 AddMessage(3) - added to store
DEBUG [SFTPMessage] 20 May 2022 13:13:39.959 : Reply : Name=SSH_FXP_HANDLE,Type=102,RequestID=3
DEBUG [SFTPMessage] 20 May 2022 13:13:39.959 : Send : Name=SSH_FXP_STAT,Type=17,RequestID=4
DEBUG [SSH2Channel] 20 May 2022 13:13:39.959 : Transmit 25 bytes
DEBUG [ChannelDataWindow] 20 May 2022 13:13:39.959 : Remote window size decreased to 2097054
DEBUG [PlainSocket] 20 May 2022 13:13:39.959 : Sent 80 bytes (NoDelay=True, SendBufferSize=131072, ReceiveBufferSize=131072)
DEBUG [SSH2Connection] 20 May 2022 13:13:39.959 : Packet written to socket
DEBUG [PlainSocket] 20 May 2022 13:13:39.990 : SSHSCPClient.1 Receive received 96 bytes
DEBUG [SSH2Connection] 20 May 2022 13:13:39.990 : SSHSCPClient.1 ProcessPacket pt=SSH_MSG_CHANNEL_DATA
DEBUG [SFTPMessageFactory] 20 May 2022 13:13:39.990 : SSHSCPClient.1 CreateMessage (bufferlength=42,offset=13,length=29,type=101)
DEBUG [SFTPMessage] 20 May 2022 13:13:39.990 : SSHSCPClient.1 ErrorCode|Status=2
DEBUG [SFTPMessageStore] 20 May 2022 13:13:39.990 : SSHSCPClient.1 AddMessage(4) - added to store
DEBUG [SFTPMessage] 20 May 2022 13:13:39.990 : Reply : Name=SSH_FXP_STATUS,Type=101,RequestID=4
ERROR [SFTPSubsystem] 20 May 2022 13:13:39.990 : OpenDirectory: No such file