[comp.sys.hp] problem with anonymous ftp and get command

lynch@batcomputer.tn.cornell.edu (Tim Lynch) (01/09/90)

We've come across a problem using anonymous ftp under HP-UX.  When
we log into a remote system, such as sumex we cannot use get
to get a file that is not in the current working directory.  The
following is an abbreviated listing of a session that demonstrates
the problem.  I've commented some of the lines:

[41] chemres> ftp sumex                        # we connect to sumex
Connected to sumex-aim.stanford.edu.
220 sumex-aim FTP server (SunOS 4.0/3) ready.
Name (sumex-aim.stanford.edu:): anonymous
Password (sumex-aim.stanford.edu:anonymous): 
331 Guest login ok, send ident as password.
230 Guest login ok, access restrictions apply.
ftp> dir                                       # and list the top level dir
200 PORT command successful.
150 ASCII data connection for /bin/ls (128.84.242.1,36597).
total 896
-rw-r--r--  1 1004     staff      894298 Jun 23  1989 allegro122.sit.hqx.crypt
drwxr-x--x  2 root     staff         512 Oct 23 19:11 bin
drwxr-x--x  2 root     staff         512 Nov 12  1988 etc
drwxr-sr-x  2 13       8            1536 Dec  6 15:54 imap
drwxrwsr-x 26 macmod   info-mac      512 Jan  9 02:15 info-mac
drwxr-srwt  4 root     8            1536 Dec 15 23:30 pub
drwxr-xr-x  2 1077     user          512 Feb  6  1989 tmycin
226 ASCII Transfer complete.
446 bytes received in 0.23 seconds (1.91 Kbytes/sec)

ftp> dir info-mac                           # now list the contents of info-mac
200 PORT command successful.
150 ASCII data connection for /bin/ls (128.84.242.1,36598).
total 62
-rw-r--r--  1 macmod   info-mac     2049 Jan  8 18:47 00info-mac-abstracts.abs
-rw-r--r--  1 macmod   info-mac      430 Jul 11  1989 00readme.txt
drwxr-xr-x  2 macmod   info-mac     4096 Jan  8 18:42 app
	[ ... more listing ]
drwxr-xr-x  2 macmod   info-mac     6656 Dec 27 16:54 util
drwxr-xr-x  2 macmod   info-mac     1024 Jan  5 11:41 virus
226 ASCII Transfer complete.
1582 bytes received in 0.91 seconds (1.70 Kbytes/sec)

# the next line demo's the problem 

ftp> get info-mac/00readme.txt
ftp: info-mac: No such file or directory


# I have to cd to info-mac to get the file
ftp> cd info-mac
250 CWD command successful.

ftp> get 00readme.txt
200 PORT command successful.
150 ASCII data connection for 00readme.txt (128.84.242.1,36599) (430 bytes).
226 ASCII Transfer complete.
430 bytes received in 0.21 seconds (2.02 Kbytes/sec)

# end of listing

This behavior is only seen on anonymous ftp.  It has been seen on
all remote sites we've tried.  It does not occur on other vendor's
ftp implementations. 

Anyone know what is up?

cricket@hp-ses.SDE.HP.COM (Jiminy Cricket) (01/10/90)

    # the next line demo's the problem 

    ftp> get info-mac/00readme.txt
    ftp: info-mac: No such file or directory

I think the problem is that ftp assumes that if you use "get" with only
one argument, you really mean

    ftp> get info-mac/00readme.txt info-mac/00readme.txt

which assumes the existence of an "info-mac" directory on the machine
you ftp'ed from.  Try

    ftp>  get info-mac/00readme.txt 00readme.txt

cricket

Hewlett-Packard Corporate               "If the world were a logical place,
Palo Alto, California                    men would ride sidesaddle."

wunder@hp-ses.SDE.HP.COM (Walter Underwood) (01/10/90)

   ftp> get info-mac/00readme.txt
   ftp: info-mac: No such file or directory

It is a bad error message.  It means that there is no "info-mac"
directory on the local system.  If you want to get "info-mac/00readme.txt"
into the current directory on your local system, then say:

   ftp> get info-mac/00readme.txt 00readme.txt

Or, "cd" to the "info-mac" directory on the remote system, then get
"00readme.txt".   

wunder

mayer@hplabsz.HPL.HP.COM (Niels Mayer) (01/10/90)

In article <9518@batcomputer.tn.cornell.edu> lynch@batcomputer.tn.cornell.edu (Tim Lynch) writes:
>We've come across a problem using anonymous ftp under HP-UX.
># the next line demo's the problem 
>
>ftp> get info-mac/00readme.txt
>ftp: info-mac: No such file or directory

I think I had this problem once... I solved it by creating the directory
"info-mac" on the local machine. Ftp will then drop 00readme.txt into that
directory. 

Alternatively, you could also do "get info-mac/00readme.txt 00readme.txt"
though I must admit I haven't tried this latter method.

-------------------------------------------------------------------------------
	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
		  Human-Computer Interaction Department
		       Hewlett-Packard Laboratories
			      Palo Alto, CA.
				   *