[Info-vax] Potential loss of data problem in sftp client in TCP/IP Services ?

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Mon Mar 12 12:11:01 EDT 2012


On 2012-03-12, Ken Fairfield <ken.fairfield at gmail.com> wrote:
> On Monday, March 12, 2012 8:12:48 AM UTC-7, Simon Clubley wrote:
>> I am experiencing a file truncation problem with a TCP/IP engineering
>> image version of the TCP/IP Services sftp client and I am wondering
>> if anyone here can reproduce it.
>> 
>> Try using the sftp client to send something small (so that it's easy to
>> check; I am using my login.com) to a Linux sftp server.
>> 
>> When I do this (both in "ascii dos" mode and binary mode) the last
>> few dozen bytes of my login.com are lost during transfer.
>
> I don't understand this.  Granted, I don't have access to
> a VMS sftp client or server anymore, but on my RHEL 5.5 server,
> the sftp client knows nothing of the ftp mode commands like 
> "binary", "image", "ascii", etc...  I thought these were 
> simply dropped from sftp.
>

It's a feature of the VMS sftp client in order to compensate for the
fact that VMS stores sequential files in various formats. It's been
documented for several versions, but only became active in the most
recent images. From the sftp help (this is the latest TCP/IP
Engineering image):

$ sftp
sftp> help
SFTP client Sftp2
) Copyright 1976, 2003 Hewlett-Packard Development Company, L.P.

Type 'help <topic>', where <topic> is one of the following commands:

open            lopen           close           quit            cd
lcd             pwd             lpwd            ls              lls
get             mget            put             mput            rm
lrm             mkdir           lmkdir          rmdir           lrmdir
rename          lrename         readlink        lreadlink       symlink
lsymlink        ascii           binary          auto            setext
getext          lsroots         debug           verbose         help

sftp> help binary
binary
Files will be transfered in binary mode.
sftp> help ascii
ascii [-s] [-f] [<remote_nl_conv>] [<local_nl_conv>]
With -s option, shows current newline convention. With "-f" option,
favors this configuration over what server notifies during connection
(this option mainly for testing). <remote_nl_conv> sets remote
newline convention. <local_nl_conv> operates on local side, but is
not as useful (the correct local newline convention is usually
compiled in, so this is mainly for testing). You can set either of
these to "ask", which will cause sftp to prompt you for the
newline convention when needed. With the exception of "-s" option,
this command sets transfer mode to ascii. Available conventions are
"dos", "unix" or "mac", using "\r\n", "\n" and "\r"
as newlines, respectively.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list