Trouble Uploading

Advertisement

zuckermanf
Joined:
Posts:
1
Location:
San Diego

Trouble Uploading

I'm having trouble uploading.
It appears to be successful since it is a large file (12mb) and takes about 60 seconds.
But if I connect to the remote site with FileZilla, the file is not there.
If I upload the file using FileZilla, it works.
But I need to upload the file in a batch file, not interactively.
Thank you for any suggestions.

Here's my script:
open sftp://XXXXX:XXXXX@ftp.XXXXX.com -hostkey="XXXXX"
cd /RemoteFolder/Hotsheet 
put -nopreservetime C:\PDDBAPPS\HotSheet.dat 
exit
And here is the WinSCP log file:
(Which I cannot fully understand)
. 2022-10-18 01:18:31.388 --------------------------------------------------------------------------
. 2022-10-18 01:18:31.404 WinSCP Version 5.21.5 (Build 12858 2022-10-06) (OS 10.0.19042 - Windows 10 Enterprise)
. 2022-10-18 01:18:31.404 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2022-10-18 01:18:31.404 Log level: Normal
. 2022-10-18 01:18:31.404 Local account: SDPDNT_DOM\fzuckerman
. 2022-10-18 01:18:31.404 Working directory: C:\Windows
. 2022-10-18 01:18:31.404 Process ID: 3420
. 2022-10-18 01:18:31.420 Ancestor processes: cmd, explorer, ...
. 2022-10-18 01:18:31.420 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"  /script=C:\PDDBAPPS\CScript.txt /log=C:\PDDBAPPS\log.txt
. 2022-10-18 01:18:31.435 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/13/2022, DST End: 11/6/2022
. 2022-10-18 01:18:31.435 Login time: Tuesday, October 18, 2022 1:18:31 AM
. 2022-10-18 01:18:31.435 --------------------------------------------------------------------------
. 2022-10-18 01:18:31.435 Script: Retrospectively logging previous script records:
> 2022-10-18 01:18:31.435 Script: open sftp://***:***@ftp.civicsmart.com -hostkey="***"
. 2022-10-18 01:18:31.435 --------------------------------------------------------------------------
. 2022-10-18 01:18:31.435 Session name: ***.com (Ad-Hoc site)
. 2022-10-18 01:18:31.435 Host name: ***.com (Port: 22)
. 2022-10-18 01:18:31.435 User name: *** (Password: Yes, Key file: No, Passphrase: No)
. 2022-10-18 01:18:31.435 Tunnel: No
. 2022-10-18 01:18:31.435 Transfer Protocol: SFTP
. 2022-10-18 01:18:31.435 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2022-10-18 01:18:31.435 Disable Nagle: No
. 2022-10-18 01:18:31.435 Proxy: None
. 2022-10-18 01:18:31.435 Send buffer: 262144
. 2022-10-18 01:18:31.435 Compression: No
. 2022-10-18 01:18:31.435 Bypass authentication: No
. 2022-10-18 01:18:31.435 Try agent: Yes; Agent forwarding: No; KI: Yes; GSSAPI: Yes
. 2022-10-18 01:18:31.435 GSSAPI: KEX: No; Forwarding: No; Libs: gssapi32,sspi,custom; Custom: 
. 2022-10-18 01:18:31.435 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2022-10-18 01:18:31.435 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2022-10-18 01:18:31.435 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2022-10-18 01:18:31.435 Simple channel: Yes
. 2022-10-18 01:18:31.435 Return code variable: Autodetect; Lookup user groups: Auto
. 2022-10-18 01:18:31.435 Shell: default
. 2022-10-18 01:18:31.435 EOL: LF, UTF: Auto
. 2022-10-18 01:18:31.435 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2022-10-18 01:18:31.435 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2022-10-18 01:18:31.435 SFTP Bugs: Auto,Auto
. 2022-10-18 01:18:31.435 SFTP Server: default
. 2022-10-18 01:18:31.435 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2022-10-18 01:18:31.435 Cache directory changes: Yes, Permanent: Yes
. 2022-10-18 01:18:31.435 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2022-10-18 01:18:31.435 DST mode: Unix
. 2022-10-18 01:18:31.435 --------------------------------------------------------------------------
< 2022-10-18 01:18:31.435 Script: Searching for host...
. 2022-10-18 01:18:31.435 Looking up host "***.com" for SSH connection
. 2022-10-18 01:18:31.451 Connecting to 64.132.70.132 port 22
. 2022-10-18 01:18:31.514 Connected to 64.132.70.132
< 2022-10-18 01:18:31.514 Script: Connecting to host...
. 2022-10-18 01:18:31.514 We claim version: SSH-2.0-WinSCP_release_5.21.5
. 2022-10-18 01:18:31.514 Connected to 64.132.70.132
. 2022-10-18 01:18:31.592 Remote version: SSH-2.0-srtSSHServer_11.00
. 2022-10-18 01:18:31.592 Using SSH protocol version 2
. 2022-10-18 01:18:31.592 Have a known host key of type rsa2
. 2022-10-18 01:18:31.608 Doing Diffie-Hellman group exchange
. 2022-10-18 01:18:31.779 Doing Diffie-Hellman key exchange using 2070-bit modulus and hash SHA-256 with a server-supplied group
. 2022-10-18 01:18:32.389 Host key fingerprint is:
. 2022-10-18 01:18:32.389 ssh-rsa 4096 SHA256:ito+IWQtNUAtFgtiMfYY0b2VW2DItDXCstK6gCXkgWA
< 2022-10-18 01:18:32.389 Script: Authenticating...
. 2022-10-18 01:18:32.389 Host key matches configured key fingerprint
. 2022-10-18 01:18:32.389 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] outbound encryption
. 2022-10-18 01:18:32.389 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2022-10-18 01:18:32.389 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] inbound encryption
. 2022-10-18 01:18:32.389 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2022-10-18 01:18:32.467 Using username "***".
< 2022-10-18 01:18:32.467 Script: Using username "***".
. 2022-10-18 01:18:32.530 Server offered these authentication methods: publickey,password
. 2022-10-18 01:18:32.530 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2022-10-18 01:18:32.530 Using stored password.
< 2022-10-18 01:18:32.530 Script: Authenticating with pre-entered password.
. 2022-10-18 01:18:32.530 Sent password
. 2022-10-18 01:18:32.666 Access granted
. 2022-10-18 01:18:32.666 Opening main session channel
. 2022-10-18 01:18:32.729 Opened main channel
. 2022-10-18 01:18:32.791 Started a shell/command
< 2022-10-18 01:18:32.791 Script: Authenticated.
. 2022-10-18 01:18:32.791 --------------------------------------------------------------------------
. 2022-10-18 01:18:32.807 Using SFTP protocol.
. 2022-10-18 01:18:32.807 Doing startup conversation with host.
< 2022-10-18 01:18:32.807 Script: Starting the session...
> 2022-10-18 01:18:32.807 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2022-10-18 01:18:32.869 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2022-10-18 01:18:32.869 SFTP version 3 negotiated.
. 2022-10-18 01:18:32.869 We believe the server has signed timestamps bug
. 2022-10-18 01:18:32.869 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2022-10-18 01:18:32.869 Getting current directory name.
. 2022-10-18 01:18:32.869 Getting real path for '.'
> 2022-10-18 01:18:32.869 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2022-10-18 01:18:32.947 Type: SSH_FXP_NAME, Size: 51, Number: 16
. 2022-10-18 01:18:32.947 Real path is '/'
. 2022-10-18 01:18:32.947 Startup conversation with host finished.
< 2022-10-18 01:18:32.947 Script: Session started.
< 2022-10-18 01:18:32.947 Script: Active session: [1] ***.com
> 2022-10-18 01:18:32.947 Script: cd /RemoteFolder/Hotsheet 
. 2022-10-18 01:18:32.947 Cached directory change via "/RemoteFolder/Hotsheet" to "/RemoteFolder/Hotsheet".
. 2022-10-18 01:18:32.947 Getting current directory name.
< 2022-10-18 01:18:32.947 Script: /RemoteFolder/Hotsheet
> 2022-10-18 01:18:32.947 Script: put -nopreservetime C:\PDDBAPPS\HotSheet.dat 
. 2022-10-18 01:18:32.947 Copying 1 files/directories to remote directory "/ToCivicSmart/Hotsheet" - total size: 12,622,198
. 2022-10-18 01:18:32.947   PrTime: No; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: 
. 2022-10-18 01:18:32.947   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; EncryptNewFiles: Yes; ExcludeHiddenFiles: No; ExcludeEmptyDirectories: No; InclM: ; ResumeL: 0
. 2022-10-18 01:18:32.947   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2022-10-18 01:18:32.947 File: 'C:\PDDBAPPS\HotSheet.dat' [2022-10-18T07:09:07.324Z] [12622198]
. 2022-10-18 01:18:32.947 Copying "C:\PDDBAPPS\HotSheet.dat" to remote directory started.
. 2022-10-18 01:18:32.947 Binary transfer mode selected.
. 2022-10-18 01:18:32.947 Checking existence of file.
> 2022-10-18 01:18:32.947 Type: SSH_FXP_LSTAT, Size: 44, Number: 263
< 2022-10-18 01:18:33.010 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2022-10-18 01:18:33.010 File exists: HotSheet.dat;-;12622198;2022-10-18T08:06:15.000Z;4;"" [0];"" [0];rwx------;0
. 2022-10-18 01:18:33.025 Checking existence of partially transferred file.
> 2022-10-18 01:18:33.025 Type: SSH_FXP_LSTAT, Size: 53, Number: 519
< 2022-10-18 01:18:33.088 Type: SSH_FXP_STATUS, Size: 32, Number: 519
< 2022-10-18 01:18:33.088 Status code: 2
. 2022-10-18 01:18:33.088 Opening remote file.
> 2022-10-18 01:18:33.088 Type: SSH_FXP_OPEN, Size: 69, Number: 771
< 2022-10-18 01:18:33.166 Type: SSH_FXP_HANDLE, Size: 17, Number: 771
> 2022-10-18 01:18:33.166 Type: SSH_FXP_WRITE, Size: 32797, Number: 1286
. 2022-10-18 01:18:34.572 Increasing send buffer from 262144 to 524288
. 2022-10-18 01:19:34.504 693 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2022-10-18 01:19:34.504 Type: SSH_FXP_CLOSE, Size: 17, Number: 91652
< 2022-10-18 01:19:34.504 Type: SSH_FXP_STATUS, Size: 19, Number: 88582
< 2022-10-18 01:19:34.504 Status code: 0
< 2022-10-18 01:19:34.629 Type: SSH_FXP_STATUS, Size: 19, Number: 88838
< 2022-10-18 01:19:34.629 Status code: 0
< 2022-10-18 01:19:35.145 Type: SSH_FXP_STATUS, Size: 19, Number: 89094
< 2022-10-18 01:19:35.145 Status code: 0
< 2022-10-18 01:19:35.145 Type: SSH_FXP_STATUS, Size: 19, Number: 89350
< 2022-10-18 01:19:35.145 Status code: 0
< 2022-10-18 01:19:35.332 Type: SSH_FXP_STATUS, Size: 19, Number: 89606
< 2022-10-18 01:19:35.332 Status code: 0
< 2022-10-18 01:19:35.535 Type: SSH_FXP_STATUS, Size: 19, Number: 89862
< 2022-10-18 01:19:35.535 Status code: 0
< 2022-10-18 01:19:35.738 Type: SSH_FXP_STATUS, Size: 19, Number: 90118
< 2022-10-18 01:19:35.738 Status code: 0
< 2022-10-18 01:19:35.972 Type: SSH_FXP_STATUS, Size: 19, Number: 90374
< 2022-10-18 01:19:35.972 Status code: 0
< 2022-10-18 01:19:36.129 Type: SSH_FXP_STATUS, Size: 19, Number: 90630
< 2022-10-18 01:19:36.129 Status code: 0
< 2022-10-18 01:19:36.316 Type: SSH_FXP_STATUS, Size: 19, Number: 90886
< 2022-10-18 01:19:36.316 Status code: 0
< 2022-10-18 01:19:36.488 Type: SSH_FXP_STATUS, Size: 19, Number: 91142
< 2022-10-18 01:19:36.488 Status code: 0
< 2022-10-18 01:19:36.816 Type: SSH_FXP_STATUS, Size: 19, Number: 91398
< 2022-10-18 01:19:36.816 Status code: 0
< 2022-10-18 01:19:36.816 Type: SSH_FXP_STATUS, Size: 19, Number: 91652
< 2022-10-18 01:19:36.816 Status code: 0
> 2022-10-18 01:19:36.816 Type: SSH_FXP_REMOVE, Size: 44, Number: 91917
< 2022-10-18 01:19:36.894 Type: SSH_FXP_STATUS, Size: 19, Number: 91917
< 2022-10-18 01:19:36.894 Status code: 0
> 2022-10-18 01:19:36.894 Type: SSH_FXP_RENAME, Size: 92, Number: 92178
< 2022-10-18 01:19:36.972 Type: SSH_FXP_STATUS, Size: 19, Number: 92178
< 2022-10-18 01:19:36.972 Status code: 0
> 2022-10-18 01:19:36.972 Type: SSH_FXP_SETSTAT, Size: 52, Number: 1033
< 2022-10-18 01:19:37.035 Type: SSH_FXP_STATUS, Size: 19, Number: 1033
< 2022-10-18 01:19:37.035 Status code: 0
. 2022-10-18 01:19:37.035 Transfer done: 'C:\PDDBAPPS\HotSheet.dat' => '/RemoteFolder/Hotsheet/HotSheet.dat' [12622198]
. 2022-10-18 01:19:37.035 Copying finished: Transferred: 12,622,198, Elapsed: 0:01:04, CPS: 196,951/s
> 2022-10-18 01:19:37.035 Script: exit 
. 2022-10-18 01:19:37.035 Script: Exit code: 0
. 2022-10-18 01:19:37.035 Closing connection.
. 2022-10-18 01:19:37.035 Sending special code: 1
. 2022-10-18 01:19:37.097 Main session channel closed
. 2022-10-18 01:19:37.097 All channels closed

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: Trouble Uploading

Post a log file of FileZilla upload. And a log of you checking, if the file is there. What if you add ls command after the put? Would it list the uploaded file?

Reply with quote

Advertisement

You can post new topics in this forum