🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.security.ssh
Article #23

Re: z/os scp expects text files? I thought scp was binary only?

#23
From: Richard E. Silverman
Date: Sat, 25 Feb 2006 03:22
47 lines
3913 bytes

>>>>> "tonij67" == tonij67  <tonij67@hotmail.com> writes:

    tonij67> Wierd problem going on here: I need to transfer files to a
    tonij67> OS/390 machine from a Solaris machine.  I use scp for a whole
    tonij67> lot of transfers every day with no problems so it seems like
    tonij67> the obvious choice. (I am using OpenSSH 4.3p2) We have been
    tonij67> having problems in that every time we send a ZIP file to this
    tonij67> z/os system, they are unable to decompress it.  i.e. its
    tonij67> corrupted.

    tonij67> I can send zip files to every other machine on our network,
    tonij67> and even a few machines on *their* network, all different
    tonij67> platforms.  The only one that has issues is this one OS/390.
    tonij67> I suggested they investigate the verison of SSH they are
    tonij67> running and they told me that scp expects all files to be
    tonij67> text, so the only way for this to work is for us to use sftp
    tonij67> instead of scp.

    tonij67> So I am just scratching my head here...all of the reading I
    tonij67> have done has lead me to believe that scp doesnt even *HAVE*
    tonij67> a text/binary mode, that its always binary.

    tonij67> Anyone have any idea what gives here?

Scp does not behave differently depending on the contents of a file: it
simply transmits the bytes in the same order over an SSH channel.  Since
both the file and the channel are byte-oriented, this is a well-defined
operation.  However: what the server-mode scp on the remote side is going
to do is a different story.  Copying files between different kinds of
filesystems is often *not* a well-defined operation.  If you're copying to
an existing file on a filesystem with forks, do you overwrite one fork
(and which one if there are already more than one?), or do you dump the
data into a new fork?  If you're copying to VMS, which of the 4 or 5 file
types supported by RMS (record management services) do you create?  Etc.
Scp has no way way of communicating or handling these kinds of differnces.
If the OS/390 filesystem has types that don't map well (or obviously) onto
UFS, this may be the problem.  It will come down to what
open()/create()/... in libc on the 390 actually do.

sftp may work better depending on the implementation, because the SFTP
protocol does have a notion of text files as a type and conversion to
handle different host representations.

-- 
  Richard Silverman res@qoxp.net
Technical Details
Message-ID: <m27j7k5dhs.fsf@darwin.oankali.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
References: <1140822140.499560.206740@e56g2000cwe.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 109d1b,3fdb708d1ca68a22
X-Google-Thread: fd4af,3fdb708d1ca68a22
X-Google-Attributes: gid109d1b,gidfd4af,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 24 Feb 2006 21:22:26 -0600
Followup-To: comp.security.ssh
Sender: res@darwin.oankali.net
Newsgroups: comp.security.ssh,bit.listserv.ibm-main
Subject: Re: z/os scp expects text files? I thought scp was binary only?
References: <1140822140.499560.206740@e56g2000cwe.googlegroups.com>
From: "Richard E. Silverman" <res@qoxp.net>
Date: 24 Feb 2006 22:22:23 -0500
Message-ID: <m27j7k5dhs.fsf@darwin.oankali.net>
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 48
NNTP-Posting-Host: 216.254.113.206
X-Trace: sv3-Nzr9RrY4Ucew3wJY83OjH/9K01Zk73GjWwt4pewWmprCT3wkXZqphlphbDH3tr2980MJqQEH6akB0xI!md1temIuUBGgN8zZVJYgd4iZZPpuJq/fyVew6NSpKBXkQndVwBczqwPX34HBAoO2xlqrHklZ/kCV!KZiogvN4HZfXPes=
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32