Archived Forum Post

Index of archived forum posts

Question:

SFTP / symLink

Oct 08 '12 at 08:55

Using Python SFTP, OpenDir and ReadDir, I can see a type node symlink, but I can not open and read (OpenDir and ReadDir) this node.

The error is:

     Sent FXP_OPENDIR
     StatusResponseFromServer:
       Request: FXP_OPENDIR
       InformationReceivedFromServer:
         StatusCode: 2
         StatusMessage: No such file
       - InformationReceivedFromServer
     - StatusResponseFromServer
     Failed.
You can open and read symlinks?

Thanks.


Answer

I tested it by creating a symbolic link to a directory on an SSH server. Then, on another computer, I connected to the server and called OpenDir using the symbolic link, and everything worked.

Please post the full contents of the LastErrorText. Also, PLEASE post the LastErrorText inside <pre> and </pre> tags so that it's readable..


Answer

Hello,

I have not control over the SSH server, I dont know how this symbolic link was created (is over customer control).

Here the complete LastErrorText.

ChilkatLog:
  OpenDir:
    DllDate: Aug  7 2012
    UnlockPrefix: ANILINSSH
    Username: pepejeans.sellbytel.es:root
    Architecture: Little Endian; 64-bit
    Language: Linux C/C++
    VerboseLogging: 0
    SshVersion: SSH-2.0-OpenSSH_5.5
    SftpVersion: 3
    path: /customers/sellbytell
    Sent FXP_OPENDIR
    StatusResponseFromServer:
      Request: FXP_OPENDIR
      InformationReceivedFromServer:
        StatusCode: 2
        StatusMessage: No such file
      --InformationReceivedFromServer
    --StatusResponseFromServer
    Failed.
  --OpenDir
--ChilkatLog

Answer

I don't think the problem is with Chilkat. I suspect one of the following:

1) The "/customers/sellbytell" directory does not actually exist on the SSH/SFTP server.
2) "/customers/sellbytell" exists, but it is a symbolic link that points to some directory that does not exist.
3) Perhaps you need to pass a directory path relative to your SSH/SFTP user account home directory, such as "customers/sellbytell" (without the leading forward slash)