[comp.sys.apple] BITFTP / FTP questions

shatara@memit.enet.dec.com (Chris Shatara) (03/13/90)

I have been trying out the recently announced BITFTP capability to allow 
users access to FTP capability who would otherwise not have access to it.

Having tried it I now have a bunch of questions, which I suspect have more 
to do with UNIX and FTP protocol than BITFTP itself. (I know nothing about 
UNIX - surprise! :-) )

As a test I tried to do two things:

    1) Get a directory of an FTP host

    2) Get a file from an FTP host

For both these tests I used APPLE.COM as the host in question.

TEST 1 - DIRECTORY:
------------------

The BITFTP command string I sent out was as follows

    FTP  apple.com
    USER anonymous
    ASCII
    DIR
    QUIT

Basically I am am specifying ASCII mode and requesting a directory.  The 
directory listing I got looked like the following:


 (lines preceeded with >'s and <'s are commands to and responses from the 
target host...not all are included here).

> DIR
>> DIR ( DISK
>>> PORT 128,112,129,99,27,2
<<< 200 PORT command successful.
>>> LIST
<<< 150 Opening ASCII mode data connection for /bin/ls (0 bytes).
<<< 226 Transfer complete.
total 3
-r--r--r--  1 root     200             0 Dec 22 16:54 .rhosts
dr-xr-xr-x  2 root     bin           512 Dec 16  1988 bin
dr-xr-xr-x  2 root     200           512 Oct 14  1988 etc
drwxrwxrwx 22 uucp     daemon        512 Mar 12 11:25 pub

> QUIT
>> CLOSE
>>> QUIT
<<< 221 Goodbye.

Now this directory looks nothing like the directory that Mark Johnson of 
Apple puts out on the net, an extract of which follows:


--        0 Feb 22 09:08 ./help/dir-files-recent
    .
    .
    .
-r    13769 Feb 21 16:59 ./human.interface/notes/hin-006.txt
-r     8280 Feb 21 16:59 ./human.interface/notes/hin-005.txt
-r     4352 Feb 21 16:59 ./human.interface/notes/hin-004.txt
-r     3607 Feb 21 16:59 ./human.interface/notes/hin-003.txt
-r     9092 Feb 21 16:58 ./human.interface/notes/hin-002.txt
-r    13279 Feb 21 16:58 ./human.interface/notes/hin-001.txt
-r     3088 Feb 21 16:57 ./human.interface/notes/hin-000.txt
-r   475180 Feb 21 11:40 ./mac/tn/tn.latest.release/tn-90-02.hqx
-r   237780 Feb 20 21:21 ./mac/tn/tn.bundles/tn.251.300.hqx



TEST 2 - GETTING A FILE:
-----------------------

My second test was to attemp to pull down one of the human interface 
notes,  hin-000.txt.

Sending the following commands string I got the message back no such file 
or directory.

    FTP apple.com
    USER anonymous
    ASCII
    GET /human.interface/notes/hin-000.txt
    QUIT

Is this the proper syntax for specifying the file in question?

The following is the transcript of the session with apple.com from BITFTP.


> FTP apple.com
> USER anonymous
>> OPEN APPLE.COM
<<< 220 apple.com FTP server (Version 4.173 Tue Aug 22 16:30:19 PDT
    1989) ready.
>> USER anonymous shatara@memit.enet.dec.com
>>> USER anonymous
<<< 331 Guest login ok, send ident as password.
>>> PASS ********
<<< 230 Guest login ok, access restrictions apply.

> ASCII
>> ASCII
>>> TYPE a
<<< 200 Type set to A.

> GET /human.interface/notes/hin-000.txt
>> GET /human.interface/notes/hin-000.txt HIN-000.TXT.D ( REPLACE
>>> PORT 128,112,129,99,26,255
<<< 200 PORT command successful.
>>> RETR /human.interface/notes/hin-000.txt
<<< 550 /human.interface/notes/hin-000.txt: No such file or director
    y.

> QUIT
>> CLOSE
>>> QUIT
<<< 221 Goodbye.

=============================================================================
|        Chris Shatara       |      Internet:    shatara@memit.enet.dec.com | 
|  Opinions expressed are    |      DEC Easynet: memit::shatara             |
|   mine and mine only!      |      UUCP:        ...!decwrl!memit!shatara   |
=============================================================================

cwilson@NISC.SRI.COM (Chan Wilson) (03/14/90)

In article <1442@mountn.dec.com> shatara@memit.enet.dec.com (Chris Shatara) writes:
>
>I have been trying out the recently announced BITFTP capability to allow 
>users access to FTP capability who would otherwise not have access to it.
>
>Having tried it I now have a bunch of questions, which I suspect have more 
>to do with UNIX and FTP protocol than BITFTP itself. (I know nothing about 
>UNIX - surprise! :-) )

Hokay.  I was going to answer this in email, but figured it might be 
of importance to someone else trying this, so...

>As a test I tried to do two things:
>
>    1) Get a directory of an FTP host
>
>    2) Get a file from an FTP host
[slurp]
[directory list follows]
total 3
>-r--r--r--  1 root     200             0 Dec 22 16:54 .rhosts
>dr-xr-xr-x  2 root     bin           512 Dec 16  1988 bin
>dr-xr-xr-x  2 root     200           512 Oct 14  1988 etc
>drwxrwxrwx 22 uucp     daemon        512 Mar 12 11:25 pub
[slurp]
Now this directory looks nothing like the directory that Mark Johnson of 
>Apple puts out on the net, an extract of which follows:
>    .
>    .
>-r    13769 Feb 21 16:59 ./human.interface/notes/hin-006.txt
>-r     8280 Feb 21 16:59 ./human.interface/notes/hin-005.txt
[slurp]

Ah, nasty.  What Mark did was do an 'ls -Rl' (or similar) from the dts
subdirectory.  You don't see a 'dts' subdirectory, do you?  That's
because it's hidden in the 'pub' directory.  You had the right approach:
>    FTP apple.com
>    USER anonymous
>    ASCII
>    GET /human.interface/notes/hin-000.txt

But it's going to fail for two reasons:

	a) It's the wrong pathname. It should have been
       	   /pub/dts/human.interface/notes/hin-000.txt

	b) Even with the correct pathname, that wouldn't have worked. You 
	   need to change to the directory before getting the file. (cd)

Try this one:

	FTP apple.com
	USER anonymous
	ASCII
	CD /pub/dts/human.interface/note
	GET hin-000.txt
	QUIT


That should work.

--Chan
			   ................
    Chan Wilson -- cwilson@nisc.sri.com <!> I don't speak for SRI.
Janitor/Architect of comp.binaries.apple2 archive on wuarchive.wustl.edu
  "And now, the penguin on top of the television set will explode."
			   ................

JDA@CU.NIH.GOV ("Doug Ashbrook") (03/14/90)

> <<< 150 Opening ASCII mode data connection for /bin/ls (0 bytes).
> <<< 226 Transfer complete.
> total 3
> -r--r--r--  1 root     200             0 Dec 22 16:54 .rhosts
> dr-xr-xr-x  2 root     bin           512 Dec 16  1988 bin
> dr-xr-xr-x  2 root     200           512 Oct 14  1988 etc
> drwxrwxrwx 22 uucp     daemon        512 Mar 12 11:25 pub
>
> > QUIT
> >> CLOSE
> >>> QUIT
> <<< 221 Goodbye.
>
> Now this directory looks nothing like the directory that Mark Johnson of
> Apple puts out on the net, an extract of which follows:

Your problem is that the directory the Mark showed was actually a
subdirectory (not sure if that is the correct term in UNIX).  What
you need to do is do a Change Directory to get to the proper
directory:

      CD pub/dts

Then if you do another DIR command you will see more subdirectories
such as human.interface, aii, and mac.  What you should do is replace
the leading "./" with "pub/dts/".

====================================================================
J. Douglas Ashbrook                                   (301) 496-5181
BITNET: JDA@NIHCU
INTERNET: JDA@CU.NIH.GOV     or     jda%nihcu.bitnet@cunyvm.cuny.edu
National Institutes of Health, Computer Center,   Bethesda, MD 20892

-+- Remember.  If some weirdo in a blue suit offers you some MS-DOS,
JUST SAY NO!

NOSES@DBNINF5.BITNET (Achim Patzner) (03/15/90)

>    FTP  apple.com
>    USER anonymous
>    ASCII
>    DIR
>    QUIT

> Now this directory looks nothing like the directory that Mark Johnson of
> Apple puts out on the net, an extract of which follows.

Try LS...

> TEST 2 - GETTING A FILE:

> My second test was to attemp to pull down one of the human interface
> notes,  hin-000.txt.

>    FTP apple.com
>    USER anonymous
>    ASCII
>    GET /human.interface/notes/hin-000.txt
>    QUIT

> Is this the proper syntax for specifying the file in question?

Not quite... You have to specify a FULL pathname (starting with /pub) or
use CD to get to the subdirectory containing those files.

> |        Chris Shatara       |      Internet:    shatara@memit.enet.dec.com |

Now something you might not like to hear... To be able to receive files
you either have to be on the Internet and able to use FTP or you have to
be on BITNET. BITFTP is forwarding files as BITNET NETDATA; no gateway will
be able to forward THAT anywhere outside BITNET. (I wanted to tell this
in my last note which -I really *LOVE* our mailer- was replaced by a
private message to Murph Sewall.) So nobody who isn't on BITNET should use
BITFTP; it's just a waste of our bandwidth.


Achim

(Noses@DBNINF5.BITNET -preferred- or ...!unido!bnu!patzner)

shatara@memit.enet.dec.com (Chris Shatara) (03/15/90)

In article <14233@fs2.NISC.SRI.COM>, cwilson@NISC.SRI.COM (Chan Wilson) writes...
{ much stuff deleted }
>	b) Even with the correct pathname, that wouldn't have worked. You 
>	   need to change to the directory before getting the file. (cd)
> 
>Try this one:
> 
>	FTP apple.com
>	USER anonymous
>	ASCII
>	CD /pub/dts/human.interface/note

                                        ^ is a / here ok or not?
>	GET hin-000.txt

            ^ I've been hearing that a "." should preceed the filename. 
    	      is this true?


=============================================================================
|        Chris Shatara       |      Internet:    shatara@memit.enet.dec.com | 
|  Opinions expressed are    |      DEC Easynet: memit::shatara             |
|   mine and mine only!      |      UUCP:        ...!decwrl!memit!shatara   |
=============================================================================

shatara@memit.enet.dec.com (Chris Shatara) (03/15/90)

Thanks to all the MANY users who have responded to my questions regarding 
this capability (BITFTP).  I'm still not out of the woods yet as I have 
yet to receive a file (but I'm now not getting any errors either).  What I 
will do is write a detailed description as how to do it along with a 
catalog of ftp sites and make this available to anyone interested.  I 
suspect that this is really needed for folks like me who are not familiar 
with UNIX.

I will also send these instruction to the folks who provide the BITFTP 
capability.

Thanks again...Chris

=============================================================================
|        Chris Shatara       |      Internet:    shatara@memit.enet.dec.com | 
|  Opinions expressed are    |      DEC Easynet: memit::shatara             |
|   mine and mine only!      |      UUCP:        ...!decwrl!memit!shatara   |
=============================================================================

gwyn@smoke.BRL.MIL (Doug Gwyn) (03/15/90)

In article <1442@mountn.dec.com> shatara@memit.enet.dec.com (Chris Shatara) writes:
>>>> LIST
>drwxrwxrwx 22 uucp     daemon        512 Mar 12 11:25 pub
>Now this directory looks nothing like the directory that Mark Johnson of 
>Apple puts out on the net, an extract of which follows:
>-r    13769 Feb 21 16:59 ./human.interface/notes/hin-006.txt

That's because Mark had set his "current working directory" (analogous
to ProDOS current prefix) to "pub/dts" first.  If you have no way to
issue a "change directory" request to FTP, then simply add the "pub/dts/"
prefix to filenames when you try to get them.

>    GET /human.interface/notes/hin-000.txt
>Is this the proper syntax for specifying the file in question?

No.  If your current working directory had been set to "pub/dts",
you'd need to omit the leading slash, just as with ProDOS names.
Otherwise (as indicated above) you need to add the prefix as in
	GET pub/dts/human.interface/notes/hin-000.txt

jason@madnix.UUCP (Jason Blochowiak) (03/16/90)

	[I didn't include his message, which included transcripts of sessions
from BITFTP - he was asking what he did wrong]

	The DTS stuff is in /pub/dts/whatever - I believe that there's
/pub/dts/aii and /pub/dts/mac. Basically, unix has a pathname spec that's quite
similar to ProDOS. So, /pub is (effectively - I don't want to hear from any of
the unix folks out there about this) the "public" volume, with various folders
within. If my memory serves (I've been FTP-less for awhile, and just found out
about BITFTP - I'm thrilled, but I'm busy), there's a press release directory,
the Developer Technical Services directory, and perhaps some other stuff.
Anyways, get a listing of /pub, /pub/dts, /pub/dts/mac, and /pub/dts/aii. You
should be able to figure out where what you're interested is hiding from
there.

	Btw, I thought that the HIG notes were in some Mac word processor
format - this may not be a problem for some folks, but it's certainly something
to be aware of... Also, if they are in a Mac WP format, they're almost
certainly processed with BinHex and StuffIt (the Mac analogs for BinSCII and
ShrinkIt).
-- 
                      Jason Blochowiak - jason@madnix.UUCP
or, try:         astroatc!nicmad!madnix!jason@spool.cs.wisc.edu
       "Education, like neurosis, begins at home." - Milton R. Saperstein

UNESTJ@UNCVX1.BITNET (Tamara) (03/21/90)

                                                    Time : 20-MAR-1990 21:47

>
> Your problem is that the directory the Mark showed was actually a
> subdirectory (not sure if that is the correct term in UNIX).  What
  [stuff deleted]

> Then if you do another DIR command you will see more subdirectories


> J. Douglas Ashbrook                                   (301) 496-5181

 Hmmm. Last time I used Unix it was an LS command not DIR for a directory of
 list. Unless mark is using an alias?

--------
"All the bridges that you burn
Come back one day to haunt you"  Tracy Chapman
                                   UNESTJ@uncvx1.bitnet
<Tamara>

gwyn@smoke.BRL.MIL (Doug Gwyn) (03/22/90)

In article <9003210249.AA08796@apple.com> UNESTJ@UNCVX1.BITNET (Tamara) writes:
> Hmmm. Last time I used Unix it was an LS command not DIR for a directory of
> list. Unless mark is using an alias?

We're talking about FTP commands, not UNIX utilities.