Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3859

Why do the error "LIBSSH2_ERROR_SFTP_PROTOCOL " occurs, while trying to transfer file from the client from another PC?

$
0
0

I am trying to transfer file from one PC(Linux - client) to another PC( where Rebex Tiny Server is running - Windows). The connection is successful, but the code fails to transfer the file. The LIBSSH2_ERROR_SFTP_PROTOCOL error happens while trying to open the file specified as sftp_path (i.e the data folder in rebex).Attaching the code snippet.

 sftp_handle = libssh2_sftp_open(sftp_session, sftppath, 
               LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC,
               LIBSSH2_SFTP_S_IRUSR|LIBSSH2_SFTP_S_IWUSR|
               LIBSSH2_SFTP_S_IRGRP|LIBSSH2_SFTP_S_IROTH);

 if(!sftp_handle &&

           (libssh2_session_last_errno(session) == LIBSSH2_ERROR_SFTP_PROTOCOL)) {
        fprintf(stderr, "Unable to open file with SFTP\n");

        goto shutdown;

}

Viewing all articles
Browse latest Browse all 3859

Trending Articles