Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic Products and Algorithms / Satellite Data Access / ftp LIST and NLST commands return different lists (locked) (7691 hits)
By bmurch Date 2009-08-27 19:07
I have a perl script that is failing in  /subscriptions/917 while trying to download MOD00.P2009232.2015_1.PDS.bz2. It may fail in other subscriptions as well, but fails here first. That file doesn't exist when I login via command line ftp and do an 'ls' or 'dir' or use gftp for instance???

However, if I command line ftp anonymous login and cd subcription/917 and do a "nlist" command, the MOD00.P2009232.2015_1.PDS.bz2 shows up.  In my perlscript I create an perl $ftp object to your oceans.gsfc.nasa.gov ftp server and get a list via @tmp = $ftp->ls() (uses NLST) and then loop though and print out list. This list contains MOD00.P2009232.2015_1.PDS.bz2 When I do a test and list via @tmp = $ftp->dir() (uses LIST) and then loop though and print out list, the file is not there. The nlist also shows MOD00.P2009235.0705_1.PDS.bz2 and MOD00.P2009237.0340_1.PDS.bz2 that do not exist for download. From GFTP log:

LIST -a

150 Opening ASCII mode data connection for file list
226 Transfer complete.
CWD /subscriptions/917/MOD00.P2009232.2015_1.PDS.bz2

550 /subscriptions/917/MOD00.P2009232.2015_1.PDS.bz2: No such file or directory
CWD /subscriptions/917/MOD00.P2009235.0705_1.PDS.bz2

550 /subscriptions/917/MOD00.P2009235.0705_1.PDS.bz2: No such file or directory
CWD /subscriptions/917/MOD00.P2009237.0340_1.PDS.bz2

550 /subscriptions/917/MOD00.P2009237.0340_1.PDS.bz2: No such file or directory

Why does the NLST (nlist) or method $ftp->ls() show files that are not available for download but they are __NOT__ seen with a regular LIST (ls or dir) or method  $ftp->dir()?

I created 2 files to compare and get this:

[xband@corals bin]$ diff LIST NLST
1c1
< LIST
---

> NLST


31a32

> MOD00.P2009232.2015_1.PDS.bz2


59a61

> MOD00.P2009235.0705_1.PDS.bz2


80a83

> MOD00.P2009237.0340_1.PDS.bz2


Is this server bug? I do not want to have to parse the output of $ftp->dir() and wish to continue to use
$ftp->ls(). I suspect it has something to do with a ftp server directive that tells the server not to show 0 length files perhaps with the LIST, but somehow gets missed in the NLST?

Brock
By bmurch Date 2009-08-28 14:12
I have located further that in /subcription/922 there is one file like this as well:

[xband@corals bin]$ diff LIST_922 NLST_922
1c1
< LIST dir 922
---

> NLST ls 922


129a130

> MOD00.A2009237.1610_1.PDS.bz2


MOD00.A2009237.1610_1.PDS.bz2 shows up in a raw NLST but not in a raw LIST command. So again $ftp->ls(); gives me a name I can't download. I wonder if other L0 subscriptions have this issue.

Brock
Previous Next Up Topic Products and Algorithms / Satellite Data Access / ftp LIST and NLST commands return different lists (locked) (7691 hits)



Responsible NASA Official: Gene C. Feldman
Curator: OceanColor Webmaster
Authorized by: Gene C. Feldman
Updated: 27 November 2007
Privacy Policy and Important Notices NASA logo