izumi@mindseye.berkeley.edu (Izumi Ohzawa) (12/22/90)
I am having problems with the behavior of NeXT ftpd for 'mget' command. It's in release 1.0a, and in 2.0Fuchsia. The problem is that "mget *" from a client seems to return a file list which contains entries such as: subdir_name/filename subdir_name/filename2 .... In other words, it doesn't expand into a list of files in the current working directory, but expands into files ONE LEVEL into subdirectories in the current working directory. I have tested this in 4.3BSD, and SunOS 4.0.3, 4.1. The problem happens only for NeXT's ftpd. The funny thing is that this expansion only goes down one level into a subdirectory, but not more than one level. Is this a known problem or a FEATURE? What should I do to fixed this? Is this fixed in the real 2.0 release? (Someone with 2.0 please test this?). I would appreciate any leads. Thanks. Izumi Ohzawa, izumi@mindseye.berkeley.edu
eps@toaster.SFSU.EDU (Eric P. Scott) (12/26/90)
In article <1990Dec22.075502.2891@agate.berkeley.edu> izumi@mindseye.berkeley.edu (Izumi Ohzawa) writes: >The problem is that "mget *" from a client seems to >return a file list which contains entries such as: > >subdir_name/filename >subdir_name/filename2 >I have tested this in 4.3BSD, and SunOS 4.0.3, 4.1. The >problem happens only for NeXT's ftpd. >Is this a known problem or a FEATURE? It's a feature(!), and not something NeXT introduced--you can blame the friendly folks on Your Own Campus, but before you complain, read on. LONG ANSWER: mget works by sending an FTP NLST command, and executing a RETR for each name in the returned list. In ->OLD<- versions of BSD ftpd, this forked /bin/ls to generate the listing. So if I had in my current directory the files a b/d c and I did ls * it would come back with a c b: d The BSD ftp client is "cleverly" hacked to stop reading when it gets to a blank line--this it what kept it from descending into subdirectories. Unfortunately, this depended on NLST being "broken"--at least as far as non-BSD clients were concerned. In post-4.3 ftpds, the "globbing" is done internally (so NLST * becomes effectively NLST a b c), then each file name is echoed, and each directory is listed out, giving a b/d c This behavior is consistent with the requirements of RFC 1123. SHORT ANSWER: Use mget . instead of mget * -=EPS=-