Topic "PUT 0 byte file Fails - special code: 12"

Author Message
TSNARR

Guest


I am attempting to put a zero byte file on SFTP server. If the file is larger than 0 byte it transmits fine. If the file is o bytes it fails. This occurs in script and when using the gui. This doesn't appear to be server side, because i can use other SFTP clients and have no problems pushing the 0 byte file. I have attached the log file for details. In this example there are 2 files. This happens even if the 0 byte file is the only file in the folder.



. 2016-01-27 09:41:20.601 --------------------------------------------------------------------------
. 2016-01-27 09:41:20.601 WinSCP Version 5.7.6 (Build 5874) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2016-01-27 09:41:20.601 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2016-01-27 09:41:20.601 Log level: Normal
. 2016-01-27 09:41:20.601 Local account: PRAXISDFW\t.snarr
. 2016-01-27 09:41:20.601 Working directory: C:\Windows\system32
. 2016-01-27 09:41:20.601 Process ID: 9928
. 2016-01-27 09:41:20.601 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=576 /consoleinstance=_9492_572 "/log=C:\winscp.log" "/loglevel=0" "/script=C:\Users\t.snarr\Desktop\TMC.Notes.txt"
. 2016-01-27 09:41:20.601 Time zone: Current: GMT-6, Standard: GMT-6 (Central Standard Time), DST: GMT-5 (Central Daylight Time), DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-01-27 09:41:20.602 Login time: Wednesday, January 27, 2016 9:41:20 AM
. 2016-01-27 09:41:20.602 --------------------------------------------------------------------------
. 2016-01-27 09:41:20.602 Script: Retrospectively logging previous script records:
> 2016-01-27 09:41:20.602 Script: open winscp-sftp://Tsnarr:***@praxis.brickftp.com/Tucson%20Medical%20Center/Praxis%20to%20TMC%20Daily%20Note%20File/ -hostkey="ssh-dss 1024 14:7a:2e:9b:91:ef:d1:86:c3:74:04:27:e4:40:85:d4"
. 2016-01-27 09:41:20.602 --------------------------------------------------------------------------
. 2016-01-27 09:41:20.602 Session name: Tsnarr@praxis.brickftp.com (Ad-Hoc site)
. 2016-01-27 09:41:20.602 Host name: praxis.brickftp.com (Port: 22)
. 2016-01-27 09:41:20.602 User name: Tsnarr (Password: Yes, Key file: No)
. 2016-01-27 09:41:20.602 Tunnel: No
. 2016-01-27 09:41:20.602 Transfer Protocol: SFTP
. 2016-01-27 09:41:20.602 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-01-27 09:41:20.602 Disable Nagle: No
. 2016-01-27 09:41:20.602 Proxy: none
. 2016-01-27 09:41:20.602 Send buffer: 262144
. 2016-01-27 09:41:20.602 SSH protocol version: 2; Compression: No
. 2016-01-27 09:41:20.602 Bypass authentication: No
. 2016-01-27 09:41:20.602 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-01-27 09:41:20.602 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-01-27 09:41:20.602 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-01-27 09:41:20.602 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A
. 2016-01-27 09:41:20.602 Simple channel: Yes
. 2016-01-27 09:41:20.602 Return code variable: Autodetect; Lookup user groups: A
. 2016-01-27 09:41:20.602 Shell: default
. 2016-01-27 09:41:20.602 EOL: 0, UTF: 2
. 2016-01-27 09:41:20.602 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-01-27 09:41:20.602 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-01-27 09:41:20.602 SFTP Bugs: A,A
. 2016-01-27 09:41:20.602 SFTP Server: default
. 2016-01-27 09:41:20.602 Local directory: default, Remote directory: /Tucson Medical Center/Praxis to TMC Daily Note File/, Update: Yes, Cache: Yes
. 2016-01-27 09:41:20.602 Cache directory changes: Yes, Permanent: Yes
. 2016-01-27 09:41:20.602 DST mode: 1
. 2016-01-27 09:41:20.602 --------------------------------------------------------------------------
. 2016-01-27 09:41:20.602 Looking up host "praxis.brickftp.com"
. 2016-01-27 09:41:20.806 Connecting to 52.28.101.76 port 22
. 2016-01-27 09:41:21.107 Server version: SSH-2.0-SSHD-CORE-0.11.0-1
. 2016-01-27 09:41:21.107 Using SSH protocol version 2
. 2016-01-27 09:41:21.107 We claim version: SSH-2.0-WinSCP_release_5.7.6
. 2016-01-27 09:41:21.259 Doing Diffie-Hellman group exchange
. 2016-01-27 09:41:21.632 Doing Diffie-Hellman key exchange with hash SHA-256
. 2016-01-27 09:41:21.873 Verifying host key dss 0xfd7f53811d751229 52df4a9c2eece4e7 f611b7523cef4400 c31e3f80b6512669 455d402251fb593d 8d58fabfc5f5ba30 f6cb9b556cd7813b 801d346ff26660b7 6b9950a5a49f9fe8 047b1022c24fbba9 d7feb7c61bf83b57 e7c6a8a6150f04fb 83f6d3c51ec30235 54135a169132f675 f3ae2b61d72aeff2 2203199dd14801c7 ,0x9760508f15230bcc b292b982a2eb840b f0581cf5,0xf7e1a085d69b3dde cbbcab5c36b857b9 7994afbbfa3aea82 f9574c0b3d078267 5159578ebad4594f e67107108180b449 167123e84c281613 b7cf09328cc8a6e1 3c167a8b547c8d28 e0a3ae1e2bb3a675 916ea37f0bfa2135 62f1fb627a01243b cca4f1bea8519089 a883dfe15ae59f06 928b665e807b5525 64014c3bfecf492a ,0xbd522bd134f5a60c be76a242116674ab 3edce37b353afd9d 1b5339dc9646915f 8dec7f0cc59ec8f6 00709d3cb1caadaa 259fc88ec45cd3a5 ccd5b89411a7fce7 5f222274c2fb0296 64d305584c235f05 fa85fe9ceeede986 2cd8ae9dcdea21d6 89d95145e1d71a26 9961452edf84b2a7 b211271bcde13dd2 471f53537dec1612 with fingerprint ssh-dss 1024 14:7a:2e:9b:91:ef:d1:86:c3:74:04:27:e4:40:85:d4
. 2016-01-27 09:41:21.873 Host key matches configured key
. 2016-01-27 09:41:21.873 Host key fingerprint is:
. 2016-01-27 09:41:21.873 ssh-dss 1024 14:7a:2e:9b:91:ef:d1:86:c3:74:04:27:e4:40:85:d4
. 2016-01-27 09:41:21.874 Initialised AES-256 SDCTR client->server encryption
. 2016-01-27 09:41:21.874 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2016-01-27 09:41:22.024 Initialised AES-256 SDCTR server->client encryption
. 2016-01-27 09:41:22.024 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2016-01-27 09:41:22.179 Using username "Tsnarr".
. 2016-01-27 09:41:22.337 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2016-01-27 09:41:22.338 Using stored password.
. 2016-01-27 09:41:22.338 Sent password
. 2016-01-27 09:41:22.634 Access granted
. 2016-01-27 09:41:22.634 Opening session as main channel
. 2016-01-27 09:41:22.793 Opened main channel
. 2016-01-27 09:41:23.138 Started a shell/command
. 2016-01-27 09:41:23.139 --------------------------------------------------------------------------
. 2016-01-27 09:41:23.139 Using SFTP protocol.
. 2016-01-27 09:41:23.139 Doing startup conversation with host.
> 2016-01-27 09:41:23.139 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2016-01-27 09:41:23.287 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2016-01-27 09:41:23.287 SFTP version 3 negotiated.
. 2016-01-27 09:41:23.287 We believe the server has signed timestamps bug
. 2016-01-27 09:41:23.287 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory
. 2016-01-27 09:41:23.287 Changing directory to "/Tucson Medical Center/Praxis to TMC Daily Note File/".
. 2016-01-27 09:41:23.287 Getting real path for '/Tucson Medical Center/Praxis to TMC Daily Note File/'
> 2016-01-27 09:41:23.287 Type: SSH_FXP_REALPATH, Size: 62, Number: 16
< 2016-01-27 09:41:23.433 Type: SSH_FXP_NAME, Size: 157, Number: 16
. 2016-01-27 09:41:23.433 Real path is '/Tucson Medical Center/Praxis to TMC Daily Note File'
. 2016-01-27 09:41:23.433 Trying to open directory "/Tucson Medical Center/Praxis to TMC Daily Note File".
> 2016-01-27 09:41:23.433 Type: SSH_FXP_LSTAT, Size: 61, Number: 263
< 2016-01-27 09:41:23.579 Type: SSH_FXP_ATTRS, Size: 29, Number: 263
. 2016-01-27 09:41:23.579 Getting current directory name.
. 2016-01-27 09:41:23.579 Startup conversation with host finished.
< 2016-01-27 09:41:23.580 Script: Active session: [1] Tsnarr@praxis.brickftp.com
> 2016-01-27 09:41:23.581 Script: put "R:\TMC\Praxis Notes TMC FTP\*.txt*" "/Tucson Medical Center/Praxis to TMC Daily Note File/"
. 2016-01-27 09:41:23.587 Copying 2 files/directories to remote directory "/Tucson Medical Center/Praxis to TMC Daily Note File/"
. 2016-01-27 09:41:23.587 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2016-01-27 09:41:23.587 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2016-01-27 09:41:23.587 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2016-01-27 09:41:23.595 File: 'R:\TMC\Praxis Notes TMC FTP\SCHED-20160127-50005-45.txt' [2016-01-27T11:00:13.668Z] [154412]
. 2016-01-27 09:41:23.602 Copying "R:\TMC\Praxis Notes TMC FTP\SCHED-20160127-50005-45.txt" to remote directory started.
. 2016-01-27 09:41:23.602 Binary transfer mode selected.
. 2016-01-27 09:41:23.602 Checking existence of file.
> 2016-01-27 09:41:23.602 Type: SSH_FXP_LSTAT, Size: 89, Number: 519
< 2016-01-27 09:41:23.855 Type: SSH_FXP_STATUS, Size: 97, Number: 519
< 2016-01-27 09:41:23.855 Status code: 2
. 2016-01-27 09:41:23.855 Checking existence of partially transfered file.
> 2016-01-27 09:41:23.855 Type: SSH_FXP_LSTAT, Size: 98, Number: 775
< 2016-01-27 09:41:24.103 Type: SSH_FXP_STATUS, Size: 106, Number: 775
< 2016-01-27 09:41:24.103 Status code: 2
. 2016-01-27 09:41:24.103 Opening remote file.
> 2016-01-27 09:41:24.103 Type: SSH_FXP_OPEN, Size: 114, Number: 1027
< 2016-01-27 09:41:24.252 Type: SSH_FXP_HANDLE, Size: 45, Number: 1027
> 2016-01-27 09:41:24.257 Type: SSH_FXP_WRITE, Size: 4153, Number: 1542
. 2016-01-27 09:41:24.402 7 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2016-01-27 09:41:24.402 Type: SSH_FXP_CLOSE, Size: 45, Number: 3588
< 2016-01-27 09:41:24.411 Type: SSH_FXP_STATUS, Size: 17, Number: 1542
< 2016-01-27 09:41:24.565 Type: SSH_FXP_STATUS, Size: 17, Number: 1798
< 2016-01-27 09:41:24.717 Type: SSH_FXP_STATUS, Size: 17, Number: 2054
< 2016-01-27 09:41:24.871 Type: SSH_FXP_STATUS, Size: 17, Number: 2310
< 2016-01-27 09:41:25.037 Type: SSH_FXP_STATUS, Size: 17, Number: 2566
< 2016-01-27 09:41:25.038 Type: SSH_FXP_STATUS, Size: 17, Number: 2822
< 2016-01-27 09:41:25.386 Type: SSH_FXP_STATUS, Size: 17, Number: 3078
< 2016-01-27 09:41:25.387 Type: SSH_FXP_STATUS, Size: 17, Number: 3334
< 2016-01-27 09:41:26.542 Type: SSH_FXP_STATUS, Size: 17, Number: 3588
< 2016-01-27 09:41:26.543 Status code: 0
> 2016-01-27 09:41:26.543 Type: SSH_FXP_RENAME, Size: 182, Number: 3858
< 2016-01-27 09:41:26.845 Type: SSH_FXP_STATUS, Size: 17, Number: 3858
< 2016-01-27 09:41:26.845 Status code: 0
. 2016-01-27 09:41:26.845 Preserving timestamp [2016-01-27T11:00:13.000Z]
> 2016-01-27 09:41:26.845 Type: SSH_FXP_SETSTAT, Size: 101, Number: 1289
< 2016-01-27 09:41:27.248 Type: SSH_FXP_STATUS, Size: 17, Number: 1289
< 2016-01-27 09:41:27.248 Status code: 0
. 2016-01-27 09:41:27.248 Transfer done: 'R:\TMC\Praxis Notes TMC FTP\SCHED-20160127-50005-45.txt' [154412]
. 2016-01-27 09:41:27.252 File: 'R:\TMC\Praxis Notes TMC FTP\Test Zero Byte.txt' [2016-01-27T14:44:40.979Z] [0]
. 2016-01-27 09:41:27.258 Copying "R:\TMC\Praxis Notes TMC FTP\Test Zero Byte.txt" to remote directory started.
. 2016-01-27 09:41:27.258 Binary transfer mode selected.
. 2016-01-27 09:41:27.258 Opening remote file.
> 2016-01-27 09:41:27.258 Type: SSH_FXP_OPEN, Size: 96, Number: 4099
< 2016-01-27 09:41:27.406 Type: SSH_FXP_HANDLE, Size: 45, Number: 4099
> 2016-01-27 09:41:27.407 Type: SSH_FXP_CLOSE, Size: 45, Number: 4612
> 2016-01-27 09:41:27.407 Type: SSH_FXP_SETSTAT, Size: 92, Number: 4361
< 2016-01-27 09:41:27.556 Type: SSH_FXP_STATUS, Size: 17, Number: 4612
< 2016-01-27 09:41:27.556 Status code: 0
. 2016-01-27 09:41:27.556 Preserving timestamp [2016-01-27T14:44:40.000Z]
< 2016-01-27 09:41:27.701 Type: SSH_FXP_STATUS, Size: 17, Number: 4361
< 2016-01-27 09:41:27.701 Status code: 0
. 2016-01-27 09:41:27.701 Transfer done: 'R:\TMC\Praxis Notes TMC FTP\Test Zero Byte.txt' [0]
> 2016-01-27 09:41:27.701 Script: exit
. 2016-01-27 09:41:27.702 Script: Exit code: 0
. 2016-01-27 09:41:27.702 Closing connection.
. 2016-01-27 09:41:27.702 Sending special code: 12
. 2016-01-27 09:41:27.702 Sent EOF message
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
How does it "fail"? I do not see any error in the log.
Guest




prikryl wrote:
How does it "fail"? I do not see any error in the log.

I say it fails because that zero byte file is never actually transferred. It does not show up on the SFTP server. The program looks to run successfully both through CMD and through the GUI. Except when I log onto the SFTP server the file is not there. When I look at the logs on the SFTP server it never shows the zero byte file being created. Again this is not a server side issue as I can turn around and load this via another sftp client and the file appears.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
What other SFTP client? Can you show us its log?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License