shaileshk has asked for the wisdom of the Perl Monks concerning the following question:


Hi,
I am not able to transfer files using the Net:SSH2 module. scp_get works but scp_put fails with the following message:

-28LIBSSH2_ERROR_SCP_PROTOCOLscp: {/blah/blah.tar.gz}: Permission denied

Can somebody suggest a way to resolve this error?


Regards,
Shailesh
  • Comment on LIBSSH2_ERROR_SCP_PROTOCOL error when using scp_put method from Net::SSH2

Replies are listed 'Best First'.
Re: LIBSSH2_ERROR_SCP_PROTOCOL error when using scp_put method from Net::SSH2
by almut (Canon) on Nov 30, 2009 at 09:54 UTC

    As it says, you have a permission problem, you can't write /blah/blah.tar.gz.  Maybe try a different path, i.e. one where you can write... in particular, not in the root directory /.

      Thanks for your prompt reply. I have now transferred files to the /tmp directory on the destination server, then used the sudo command to copy the files into the required directory. Work done !! Thanks again.