Subject: Ftp-WG: mdtm and mlsd commands

From: Wolfgang Zekoll <[email-masked]>
Date: Tue, 3 Feb 2004 15:53:18

Hello,

> >>>
> >>> Anything that does that is broken, it is a query command only.  There are
> >>> no standardised "set attributes" command, for any attributes I'm aware of
> >>> (possibly excluding the name...)
> >>
> >> That's a real shame as it prevents FTP from being used in mirroring.
> >
> >
> > Our FTP server for NetWare supports a site specific command. I think we 
> copied this
> > idea from some other server, but I can't recall, its been 10 years.
> >
> > site chmdtm <filename> <modtime> [<acctime>] -- change 
> modification/access time of
> > file
>
>Sounds fine, but I wonder why the working group is ignoring an absent but
>apparently needed facility which software developers are now programming
>around in a common but, of necessity because of the lack of any standard,
>a non-compliant manner.

although I'm not a member of the working group I'll try to give an 
explanation based on what I know about FTP.

As author of some FTP server software I simply must follow the original 
statement, MDTM is query only.  When I considered to implement MDTM-modify 
for my server I recognized that the guys who introduced MDTM-modify must 
have been UN*X guys.  Why?  How can the sever determine if the MDT; command 
it just got from the client is the query of modify form.  Does the 
timestamp belong to the filename or is it the modify timestamp?  This 
question can only be answered if blanks are excluded from the filename 
character set which is the natural situation for every UN*X admin).  But as 
far as I know the FTP RFCs don't do this, they allow blanks.  As Linux 
admin I can attest that blanks in filenames are bad practice but I also 
know that today's users expect them.

As server administrator I don't think that I would ever allow a remote 
client to modify timestamps of files in the FTP area.  How could I be sure 
that my existing software (backup software, archive indexer etc.) can deal 
with the situation that a newly modified file has a timestamp in the past?

Now for the last point of view, software programmer.  Using MDTM-modify is 
what I call the "easy way", easy to use, moving client problems to the 
server, even if it's non-standard.  The correct, and only sligthly more 
difficult, way would be to use some local book keeping, the client should 
maintain the meta information it needs locally.  You might take a look of

    http://www.awk-scripting.de/cgi-bin/wiki.cgi/scripting/FtpSync

to see an example for this.

But I have a question to the real FTP protocol gurus: Is there a 
recommended way to tell a client that a server does not support MDTM-modify 
but MDTM-query?

Regards

Wolfgang Zekoll

---

From: Richard Koenning <[email-masked]>
Date: Tue, 3 Feb 2004 16:47:51

Wolfgang Zekoll wrote:
> recommended way to tell a client that a server does not support 
> MDTM-modify but MDTM-query?

I'm not a real FTP protocol guru, but my opinion is: Why should a server 
tell the client that it conforms to the relevant RFCs? MDTM-modify 
doesn't conform with the upcoming RFC. When the client wants to use 
MDTM-modify, than it has to check whether the server supports this 
non-standard MDTM command (for example: transfer file; MDTM-query; 
MDTM-modify; MDTM-query; check, whether the MDTM-query results differ).
Ciao,
Richard
-- 
Dr. Richard W. Könning
Fujitsu Siemens Computers GmbH

---

From: "Robert Oslin" <[email-masked]>
Date: Wed, 4 Feb 2004 09:48:14

>>MDTM-modify; MDTM-query; check, whether the MDTM-query results differ).

We added support for MDTM-modify in CuteFTP Pro v3 due to popular demand. We
simply issue a FEAT command and if MDTM is supported and if the user has
opted to retain the current timestamp of an uploaded file, we simply attempt
the MDTM-modify sequence. If it fails we notify the user via the log. More
and more servers are adding support for both MDTM-query and MDTM-modify. It
would be nice if MDTM-modify could be formalized in an upcoming RFC or
draft, as the market wants it and it is very helpful for folder
synchronization, overwrite comparison and other such tasks.

Robert T. Oslin III
Product Manager
GlobalSCAPE Texas, LP.

---

From: Jeffrey Altman <[email-masked]>
Date: Wed, 4 Feb 2004 11:10:48

A command that has the functionality of MDTM-modify could certainly be 
created
However, it won't be MDTM-modify.  As already described, MDTM-modify won't
work with files that have spaces in their names.  This is fatal.

Jeffrey Altman

---

From: "Robert Oslin" <[email-masked]>
Date: Wed, 4 Feb 2004 14:23:13

The "experimental" MDTM modify sequence seems to work fine on the following
servers recently tested (plus I'm sure there are others):

GSFTPS
Serv-U
WS-FTP Server
RaidenFTPD
Orenosv
NcFTPd
SlimFTPd

The MTDM modify command syntax used is:

MDTM YYYYMMDDHHMMSS [<REMOTE_PATH>]<FILE_NAME>

Works for file names with and without spaces and/or paths.

Please educate me on why this would be fatal.

Robert Oslin

-----Original Message-----
From: ftp-wg-owner [mailto:[email-masked]]On Behalf Of Jeffrey
Altman
Sent: Wednesday, February 04, 2004 11:11 AM
To: FTPEXT Working Group
Subject: Ftp-WG: mdtm and mlsd commands

Jeffrey Altman

---

From: "Mark Symons" <[email-masked]>
Date: Wed, 4 Feb 2004 17:24:21

> Please educate me on why this would be fatal.

Because "YYYYMMDDHHMMSS [<REMOTE_PATH>]<FILE_NAME>" (the whole string) can itself be a legitimate filename?

Mark Symons
Ipswitch, Inc
Augusta GA