Subject: Re: Attempting to wrap sftp in Qt

Re: Attempting to wrap sftp in Qt

From: Mark Roden <mmroden_at_gmail.com>
Date: Mon, 2 May 2011 12:42:04 -0700

After further testing, it appears that it worked once, and then has
stopped working.

It looks like I'm not able to overwrite the file, despite setting the flags:
LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC

The first time, the writing works, and if I delete the file from the
server using a separate session, then the writing works again.

Are there other flags or things to check so that a file can be
overwritten, some unix permission I'm not setting when the file is
initially created?

On Mon, May 2, 2011 at 11:42 AM, Peter Stuge <peter_at_stuge.se> wrote:
> Mark Roden wrote:
>> Essentially, the server returns an error code, '2'.
>
> The server sometimes also returns a text message.
>
> If this is indeed the error code from the server then it should be
> well defined in the SFTP spec. Likewise the error message may provide
> hints on what is going wrong.
>
> Both the error code and the error message are retrievable using
> libssh2 API after libssh2_sftp_open (or another function call) fails.
>
>
>> I don't know if it's a libssh2 error or not.
>
> Is the home directory for your user writable by the user? Maybe there
> is just a path missing somewhere to specify the upload directory.
>
>
> //Peter
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-05-02