Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 8225 - ncftp reports incorrect file timestamps for Microsoft FTP 4.0 servers
Summary: ncftp reports incorrect file timestamps for Microsoft FTP 4.0 servers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ncftp
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL: ftp://ftp.quantum.com
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-06 04:53 UTC by Rob McMillin
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-06 16:56:36 UTC


Attachments (Terms of Use)

Description Rob McMillin 2000-01-06 04:53:21 UTC
ncftp seems to report incorrect file timestamps for Microsoft FTP servers,
in particular, Microsoft FTP Service Version 4.0 (IIS under WinNT?). The
time reported is several months in the future. The regular ftp client
reports the correct time.

Following is a sample.

[rlm@www rlm]$ ncftp ftp://ftp.quantum.com
NcFTP 3.0.0 beta 19 (June 11, 1999) by Mike Gleason.
Connecting to
204.212.103.137...
service Microsoft FTP Service (Version 4.0).
Logging
in...
Anonymous user logged in.
Logged in to
ftp.quantum.com.
Current remote directory is /.
ncftp / > ls
Disk_Firmware/     Tape_Firmware/     Utilities/         h_group/
ncftp / > ls -l
d---------   1 ftpuser  ftpusers            0 Sep  6 08:15 Disk_Firmware
d---------   1 ftpuser  ftpusers            0 Jan 24  2000 Tape_Firmware
d---------   1 ftpuser  ftpusers            0 Mar  5  2000 Utilities
d---------   1 ftpuser  ftpusers            0 Feb 20  2000 h_group
ncftp / > quit



        Thank you for using NcFTP.
        Ask your system administrator to try NcFTPd Server!
        http://www.ncftp.com



[rlm@www rlm]$ ftp ftp.quantum.com
Connected to service.quantum.com.
220 service Microsoft FTP Service (Version 4.0).
Name (ftp.quantum.com:rlm): anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:
230 Anonymous user logged in.
Remote system type is Windows_NT.
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
07-06-99  08:15AM       <DIR>          Disk_Firmware
12-20-99  03:35PM       <DIR>          h_group
11-24-99  03:27PM       <DIR>          Tape_Firmware
01-05-00  03:25PM       <DIR>          Utilities
226 Transfer complete.
ftp> quit
221

Comment 1 Mike Gleason 2000-01-06 07:58:59 UTC
I can confirm that bug which includes betas up through beta 21.  Since I may
not be getting beta 22 finished soon enough, here is a quick patch to apply to
the libncftp/glob.c source file:

*** glob.c	Thu Jan  6 01:44:38 2000
--- glob.c.new	Thu Jan  6 01:44:52 2000
***************
*** 208,214 ****
  		(void) memset(&ftm, 0, sizeof(struct tm));
  		ftm.tm_isdst = -1;
  		cp[2] = '\0';
! 		ftm.tm_mon = atoi(cp + 0) + 1;
  		cp[5] = '\0';
  		ftm.tm_mday = atoi(cp + 3);
  		cp[8] = '\0';
--- 208,214 ----
  		(void) memset(&ftm, 0, sizeof(struct tm));
  		ftm.tm_isdst = -1;
  		cp[2] = '\0';
! 		ftm.tm_mon = atoi(cp + 0) - 1;
  		cp[5] = '\0';
  		ftm.tm_mday = atoi(cp + 3);
  		cp[8] = '\0';

Comment 2 Jeff Johnson 2000-01-06 16:56:59 UTC
Fixed in ncftp-3.0beta21-2. Thanks for the patch.


Note You need to log in before you can comment on or make changes to this bug.