1

Trying to SFTP a file to a remote server, the file gets copied over but returns an error.

use Net::SFTP;

...

my $sftp = Net::SFTP->new($host, %args);
$sftp->put("testfile.txt", "testfile.txt.bak");

Gives the following error:
list.pl: Couldn't fsetstat: Failure at list.pl line 182

1 Answer 1

0
use Net::SFTP::Foreign;
...

my $sftp = Net::SFTP::Foreign->new($host, %args);
$sftp->put("testfile.txt", "testfile.txt.bak",
            copy_time => 0, copy_perm => 0);
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.