Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 178440 - ftp directory listing gives parse error
ftp directory listing gives parse error
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Depends On:
  Show dependency treegraph
Reported: 2006-01-20 11:38 EST by Radek Bíba
Modified: 2013-07-02 19:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-27 16:46:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Radek Bíba 2006-01-20 11:38:32 EST
Description of problem:
If a directory on an FTP server contains a file or directory whose name begins
with a number that looks like a year, mc thinks it's the year of mtime and takes
the rest as name, which results in an invalid and unusable item in the directory

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. on an FTP server: touch "2000 a"
2. on local host: run mc, cd /#ftp:USER@HOST, go to the directory with the
'specially crafted' file name and scroll down to see it (if necessary)
Actual results:
You'll see a file named 'a' with mtime set to current day and month but year
2000. Additionally, it won't be possible to copy this file because it really
doesn't exist on the server as 'a'.

It's similar if you create a directory with name like `YYYY something'.

Expected results:
Well, guess what... :)

Additional info:
It seems to me like it's confused by the output from server which looks like:
-rw-rw-r--    1 500      500             0 Jan 20 16:35 2000 a
and there is a bug in mc's mtime parsing code.
Comment 1 Leonard den Ottolander 2006-02-01 12:04:49 EST
This is now fixed in CVS. We do not longer attempt to parse more than 3 date
Comment 2 Jindrich Novy 2006-02-02 12:00:54 EST
Hi Leonard, unfortunately I cannot find any fix for this in the CVS commit
history in upstream CVS for ftpfs.c. Is the fix for this present elsewhere?
Comment 4 Radek Bíba 2006-02-28 09:32:13 EST
Indeed, mc from upstream cvs behaves as expected. Hopefully the fix will make it
into a future update in FC, along with some more important fixes.

Thanks Leonard.

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