net::sftp write error with multiple packet writes

C

csgonan

I have net::xftp and net::SFTP installed on a solaris 8 workstation,
connecting to a windows server running winscp.

I am able to uplaod a file but then receive an error message that it
could not upload. I ssh into the server and see the file is there.
The file size is exactly the total size of those 2 numbers in the
SSH2_FXP_WRITE statements (8192 + 5821). This is my ftp variable that
is used through-out the script.

I'm using xFTP because these scripts are used to ftp and sftp and need
to use the same command.

Any ideas?

my %args = (user => $ftpuser, password => $ftppass, debug => 1);
$ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)

server: sftp: Sent message T:16 I:9
server: sftp: Sent message T:16 I:10
server: sftp: Sent message T:16 I:11
server: sftp: Sent SSH2_FXP_OPEN I:12 P:/opt/websites/
register.company.org/hccs/WC_file.dat
server: sftp: Sent message SSH2_FXP_WRITE I:13 O:0
server: sftp: In write loop, got 8192 offset 0
server: sftp: Sent message SSH2_FXP_WRITE I:14 O:8192
server: sftp: In write loop, got 5821 offset 8192
server: sftp: Sent message T:10 I:15
Uploading WC_file.dat to Server .......... Error: ./
uploadSSH_company2.pl could not upload WC_file.dat to Server.
 
J

J. Gleixner

I have net::xftp and net::SFTP installed on a solaris 8 workstation,
connecting to a windows server running winscp.

I am able to uplaod a file but then receive an error message that it
could not upload.
[...]
my %args = (user => $ftpuser, password => $ftppass, debug => 1);
$ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)

Where is the code that's producing the following output? e.g.
your put() call.
Uploading WC_file.dat to Server .......... Error: ./
uploadSSH_company2.pl could not upload WC_file.dat to Server.

There should be an error message or code associated with the failure or
possibly the test for the error isn't correct. A quick guess
would be that it's a permissions problem.
 
C

csgonan

I have net::xftp and net::SFTP installed on a solaris 8 workstation,
connecting to a windows server running winscp.
I am able to uplaod a file but then receive an error message that it
could not upload.
[...]

my %args = (user => $ftpuser, password => $ftppass, debug => 1);
$ftp = Net::xFTP->new(Net::SFTP,$ftpip, %args)

Where is the code that's producing the following output? e.g.
your put() call.
Uploading WC_file.dat to Server .......... Error: ./
uploadSSH_company2.pl could not upload WC_file.dat to Server.

There should be an error message or code associated with the failure or
possibly the test for the error isn't correct. A quick guess
would be that it's a permissions problem.

This is the code

$ftp->binary;
print "Uploading $_[0] to Server .......... " if (!$silent);
$ftp->Put($_[0]) or emailerr("Error: $0 could not upload $_[0] to
Server.")
;
print "Done\n\n" if (!$silent);

Thank you for your response. I would say that but smaller files are
being places there ok now that I talked to the admin at that site. I
saw a post that talked about changing the COPY_SIZE to something
smaller than the default of 8192, but I don't see where to do that in
order to check.

As you can see in the output, it does the first write of 8192 and then
fails at he remaining bytes that totals the size of the file. I have
write access to this server too.

Thanks for any ideas.
Christine

server: sftp: Sent message SSH2_FXP_WRITE I:13 O:0
server: sftp: In write loop, got 8192 offset 0
server: sftp: Sent message SSH2_FXP_WRITE I:14 O:8192
server: sftp: In write loop, got 5821 offset 8192
 
J

J. Gleixner

This is the code

$ftp->binary;
print "Uploading $_[0] to Server .......... " if (!$silent);
$ftp->Put($_[0]) or emailerr("Error: $0 could not upload $_[0] to
Server.");

Add the reason. e.g. $ftp->message()

That's straight out of the documentation!

Also, I don't see a Put() method. 'put' is documented.
print "Done\n\n" if (!$silent);

Thank you for your response. I would say that but smaller files are
being places there ok now that I talked to the admin at that site. I
saw a post that talked about changing the COPY_SIZE to something
smaller than the default of 8192, but I don't see where to do that in
order to check.

Again, in the documentation...

BlockSize specifies the buffer size to use for buffered data transfers.
Default is 10240.

I doubt that will have any affect.
As you can see in the output, it does the first write of 8192 and then
fails at he remaining bytes that totals the size of the file. I have
write access to this server too.

The actual error message should help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top