<?xml version="1.0"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by David Somers (Trevezel Systems GmbH) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<rfc ipr="full2026" docName="draft-somers-ftp-mfxx-00">
	<front>
		<title>The 'MFxx' Command Extensions for FTP</title>
		<author initials="D. M. P." surname="Somers" fullname="David M. P. Somers">
			<organization>Trevezel Systems GmbH</organization>
			<address>
				<postal>
					<street>Rambouxstrasse 26</street>
					<city>Trier</city>
					<country>GERMANY</country>
					<code>D-54224</code>
				</postal>
				<email>dsomers@trevezel.com</email>
			</address>
		</author>
		<date month="July" year="2002"/>
		<area>Applications</area>
		<workgroup>Individual Submission</workgroup>
		<keyword>file transfer</keyword>
		<keyword>file transfer protocol</keyword>
		<keyword>Internet-Draft</keyword>
		<abstract>
			<t>This document defines extensions to the FTP specification STD9, RFC959, &quot;FILE TRANSFER PROTOCOL (FTP)&quot;.  These extensions provide the ability for a FTP Client to modify the last modification time, the creation time, or multiple facts (last modification time, creation time, operating system permissions, etc.) of a file in the server-FTP process NVFS. These extensions are implemented by three new optional commands: "MFMT" (Modify File Modification Time), "MFCT" (Modify File Creation Time), and "MFF" (Modify File Facts).</t>
		</abstract>
		<note title="Comments">
			<t>Comments should be directed to David Somers (dsomers@trevezel.com).</t>
		</note>
	</front>
	<middle>
		<section title="Introduction">
			<t>
The File Transfer Protocol (FTP) currently defined in STD 9, RFC 959 <xref target="RFC0959"/>, and in place on the Internet allows files to be transferred between a server-FTP and a user-FTP, and vice versa.  When a file is transferred from the user-FTP to the server-FTP, the creation time, last modification time, and operating system facts (for example, file permissions) can not be specified.  The NVFS typically sets these to default values.</t>
			<t>
This document defines extensions to the File Transfer Protocol.  Three new optional commands are added: "MFTM", "MFTC", "MFF".  These commands allow the last modification time, creation time, or a list of facts to be modified for an object in the NVFS.
</t>
		</section>
		<section title="Document Conventions">
			<t>This document makes use of the conventions in <xref target="RFC2119"/>.  That provides the interpretation of capitalized imperative words like MUST, SHOULD, etc.</t>
			<t>This document also uses notation defined in <xref target="RFC0959"/>.  In particular, the terms &quot;reply&quot;, &quot;user&quot;, &quot;NVFS&quot;, &quot;file&quot;, &quot;pathname&quot;, &quot;FTP commands&quot;, &quot;DTP&quot;, &quot;user-FTP process&quot;, &quot;user-PI&quot;, &quot;user-DTP&quot;, &quot;server-FTP process&quot;, &quot;server-PI&quot;, &quot;server-DTP&quot;, &quot;mode&quot;, &quot;type&quot;, &quot;NVT&quot;, &quot;control connection&quot;, &quot;data connection&quot;, and &quot;ASCII&quot;, are all used here as defined there.
</t>
			<t>
Syntax required is defined using the Augmented BNF defined in <xref target="RFC2234"/>.  Some general ABNF definitions are required throughout the document, those will be defined later in this section.  At first reading, it may be wise to simply recall that these definitions exist here, and skip to the next section.
</t>
			<section title="Basic Tokens">
				<t>This document defines basic tokens as specified in section 2.1 of <xref target="I-D.ietf-ftpext-mlst"/>.</t>
			</section>
			<section title="Pathnames">
				<t>This document defines pathnames as specified in section 2.2 of <xref target="I-D.ietf-ftpext-mlst"/>.</t>
			</section>
			<section title="Times">
				<t>This document defines times as specified in section 2.3 of <xref target="I-D.ietf-ftpext-mlst"/>.</t>
			</section>
			<section title="Server Replies">
				<t>This document defines server replies as specified in section 2.4 of <xref target="I-D.ietf-ftpext-mlst"/>.</t>
			</section>
			<section title="Interpreting Examples">
				<t>This document defines server replies as specified in section 2.5 of <xref target="I-D.ietf-ftpext-mlst"/>.</t>
			</section>
		</section>
		<section title="Modify File Modification Time (MFMT)">
			<t>The FTP command, MODIFY FILE MODIFICATION TIME (MFMT), is used to modify the last modification time of a file.</t>
			<t>It should be noted that similar functionality has been implemented by some server-PIs as the command MDTM.  However, the use of MDTM to modify the last modification time of a file conflicts with the use of the MDTM command to retrieve the last modification time of a file as defined in <xref target="I-D.ietf-ftpext-mlst"/>.  It is proposed that the MFMT command be used instead of abusing MDTM for such purposes.</t>
			<section title="Syntax">
				<t>The syntax of the MFMT command is:</t>
				<figure>
					<artwork>mfmt = "MFMT" SP time-val SP pathname CRLF</artwork>
				</figure>
				<t>As with all FTP commands, the &quot;MFMT&quot; command label is interpreted in a case insensitive manner.</t>
				<t>The &quot;time-val&quot; specifies the last modification time to be applied to the file.</t>
				<t>The &quot;pathname&quot; specifies an object in the NVFS.</t>
				<t>The server-PI will respond to the MFMT command with a 213 reply, or an error response if the object does not exist, the last modification time could not be modified, or some other error has occurred.</t>
				<figure>
					<artwork>
mfmt-response = "213" SP "ModifyTime=" time-val ";" SP pathname CRLF /
                 error-response
	</artwork>
				</figure>
			<t>The "time-val" in the response MUST be the modified last modification time of the file. This value MAY not be the same as that requested due to constraints of the NVFS to store the last modification time (for example, it may only have sufficient resolution to store the last modification time to the nearest minute instead of to the thousandths of a second that "time-val" MAY be specified to).</t>
			</section>
			<section title="Error responses">
				<t>Where the command is correctly parsed, but the pathname identifies no existing entity, then a 550 reply SHOULD be sent.  Where the command can not be correctly parsed, a 500 or 501 reply SHOULD be sent.  Various 4xy replies are also possible in appropriate circumstances.</t>
			</section>
			<section title="FEAT response for MFMT">
				<t>Where a server-FTP process supports MFMT, as specified here, it MUST include the response to the FEAT command <xref target="RFC2389"/>:</t>
				<figure>
					<artwork>
mfmt-feat = SP "MFMT" CRLF
	</artwork>
				</figure>
				<t>The initial space shown in the mfmt-feat response is that required by the FEAT command.</t>
				<t>This string "MFMT" is not case sensitive, but SHOULD be transmitted in upper case.  Where MFMT is not supported, the MFMT line MUST NOT be included in the FEAT response.</t>
				<section title="Example FEAT response">
					<figure>
						<artwork>
C> feat
S> 211- &lt;any descriptive text>
S>  ...
S>  MFMT
S>  ...
S> 211 end</artwork>
					</figure>
					<t>
The ellipses indicate place holders where other features may be
included, and are not required.  The one space indentation of the
feature lines is mandatory <xref target="RFC2389"/>.
</t>
				</section>
			</section>
			<section title="MFMT Examples">
				<t>To modify the last modification time of a file called &quot;Fred.txt&quot; to July 17, 2002 21:07:15,</t>
				<figure>
					<artwork>
C> MFMT 20020717210715 Fred.txt
S> 213 ModifyTime=20020717210715; Fred.txt
</artwork>
				</figure>
			</section>
		</section>
		<section title="Modify File Creation Time (MFCT)">
			<t>The FTP command, MODIFY FILE CREATION TIME (MFCT), is used to modify the last modification time of a file.</t>
			<t>
Implementers of this command on UNIX(TM) systems should note that the unix "stat" "st_ctime" field does not give creation time, and that unix file systems do not record creation time at all.  Unix (and POSIX) implementations will normally not support this command.
</t>
			<section title="Syntax">
				<t>The syntax of the MFCT command is:</t>
				<figure>
					<artwork>mfmt = "MFCT" SP time-val SP pathname CRLF</artwork>
				</figure>
				<t>As with all FTP commands, the &quot;MFCT&quot; command label is interpreted in a case insensitive manner.</t>
				<t>The &quot;time-val&quot; specifies the creation time to be applied to the file.</t>
				<t>The &quot;pathname&quot; specifies an object in the NVFS.</t>
				<t>The server-PI will respond to the MFCT command with a 213 reply, or an error response if the object does not exist, the creation time could not be modified, or some other error has occurred.</t>
				<figure>
					<artwork>
mfct-response = "213" SP "CreateTime=" time-val ";" SP pathname CRLF /
                 error-response
	</artwork>
				</figure>
			<t>The "time-val" in the response MUST be the modified creation time of the file. This value MAY not be the same as that requested due to constraints of the NVFS to store the creation time (for example, it may only have sufficient resolution to store the creation time to the nearest minute instead of to the thousandths of a second that "time-val" MAY be specified to).</t>
			</section>
			<section title="Error responses">
				<t>Where the command is correctly parsed, but the pathname identifies no existing entity, then a 550 reply SHOULD be sent.  Where the command can not be correctly parsed, a 500 or 501 reply SHOULD be sent.  Various 4xy replies are also possible in appropriate circumstances.</t>
			</section>
			<section title="FEAT response for MFCT">
				<t>Where a server-FTP process supports MFCT, as specified here, it MUST include the response to the FEAT command <xref target="RFC2389"/>:</t>
				<figure>
					<artwork>
mfct-feat = SP "MFCT" CRLF
	</artwork>
				</figure>
				<t>The initial space shown in the mfct-feat response is that required by the FEAT command.</t>
				<t>This string "MFCT" is not case sensitive, but SHOULD be transmitted in upper case.  Where MFCT is not supported, the MFCT line MUST NOT be included in the FEAT response.</t>
				<section title="Example FEAT response">
					<figure>
						<artwork>
C> feat
S> 211- &lt;any descriptive text>
S>  ...
S>  MFCT
S>  ...
S> 211 end</artwork>
					</figure>
					<t>
The ellipses indicate place holders where other features may be included, and are not required.  The one space indentation of the feature lines is mandatory <xref target="RFC2389"/>.
</t>
				</section>
			</section>
			<section title="MFCT Examples">
				<t>To modify the creation time of a file called &quot;Jim.txt&quot; in the current directory to July 17, 2002 21:22:30,</t>
				<figure>
					<artwork>
C> MFCT 20020717212230 Jim.txt
S> 213 CreateTime=20020717212230; Jim.txt
</artwork>
				</figure>
			</section>
		</section>
		<section title="Modify File Facts (MFF)">
			<t>The FTP command, MODIFY FILE FACTS (MFF), is used to modify one or more facts of a file.  These facts are attributes such as creation time, last modification time, or operating system specific attributes such as file permissions.</t>
			<t>This command is complimentary to the MLSx commands as detailed in <xref target="I-D.ietf-ftpext-mlst"/>.  The MLSx commands are used to standardize retrieving the file and directory information returned by the Server-FTP process; the MFF command aims to standardize modifying the facts for the file and directory objects in the NVFS.</t>
			<section title="Syntax">
				<t>The syntax of the MFF command is:</t>
				<figure>
					<artwork>
mff                = &quot;MFF&quot; [ mff-facts ] SP pathname CRLF
mff-facts          = 1*( mff-fact &quot;;&quot; )
mff-fact           = mff-standardfact / mff-osfact / mff-localfact
mff-standardfact   = mff-createtimefact / mff-modifytimefact 
mff-createtimefact = "CreateTime" "=" time-val
mff-modifytimefact = "ModifyTime" "=" time-val
mff-osfact         = &lt;IANA assigned OS name> "." token "=" *SCHAR
mff-localfact      = &quot;X.&quot; token "=" *SCHAR
</artwork>
				</figure>
				<t>As with all FTP commands, the &quot;MFF&quot; command label is interpreted in a case insensitive manner.</t>
				<t>The &quot;mff-facts&quot; are a series of facts as keyword=value pairs each followed by a semi-colon (&quot;;&quot;) character.  Fact keyword names are case-insensitive.</t>
				<t>The &quot;pathname&quot; specifies an object in the NVFS.</t>
				<t>The server-PI will respond to the MFF command with a 213 reply containing a list of the facts that MUST detail the modified values, or an error response if the object does not exist, a fact could not be modified, or some other error has occurred.</t>
				<figure>
					<artwork>
mff-response = "213" SP 1*( mff-fact ";") SP pathname CRLF /
               error-response
	</artwork>
				</figure>
				<t>The order of the "mff-fact" keyword=value pairs returned in the response MAY be in any order.</t>
				<section title="CreateTime fact">
					<t>The CreateTime fact is used to modify the creation time of the object specified by "pathname".</t>
					<t>
Implementers of this fact on UNIX(TM) systems should note that the unix "stat" "st_ctime" field does not give creation time, and that unix file systems do not record creation time at all.  Unix (and POSIX) implementations will normally not support this fact.
</t>
				</section>
				<section title="ModifyTime fact">
					<t>The ModifyTime fact is used to modify the last modification time of the object specified by "pathname".</t>
				</section>
			</section>
			<section title="Operating System specific facts">
				<t>Facts that are specific to an operating system, or file system, SHOULD be specified by keywords that are prefixed by an IANA operating system name (<eref target="ftp://ftp.iana.org/assignments/operating-system-names"/>).</t>
				<t>Implementation Note: It is envisioned that the operating system specific facts will be identical to those used by the MLSx command as detailed in <xref target="I-D.ietf-ftpext-mlst"/>.</t>
				<section title="Example Operating System specific facts">
					<figure>
						<artwork>
UNIX.mode             -- Unix file modes (permissions)
WINDOWS-NT.SIS.Author -- Windows NT,
                         Summary Information Stream, Author property
	</artwork>
					</figure>
				</section>
			</section>
			<section title="Local/Experimental &quot;X.&quot; facts">
				<t>Implementations may define keywords for experimental, or private, use.  All such keywords MUST begin with the two character sequence &quot;X.&quot;.  As type names are case-insensitive, &quot;X.&quot; and &quot;x.&quot; are equivalent.</t>
			</section>
			<section title="Error responses">
				<t>Where the command is correctly parsed, but the pathname identifies no existing entity, then a 550 reply SHOULD be sent.  Where the command can not be correctly parsed, a 500 or 501 reply SHOULD be sent.  If an unknown fact is provided, a 504 reply SHOULD be sent.  Various 4xy replies are also possible in appropriate circumstances.</t>
			</section>
			<section title="FEAT response for MFF">
				<t>Where a server-FTP process supports MFF, as specified here, it MUST include in the response to the FEAT command <xref target="RFC2389"/>, a feature line containing the string "MFF".  This string is not case sensitive, but SHOULD be transmitted in upper case.  As well as indicating MFF support, the MFF feature line indicates which MFF facts are available for modification by the server-FTP process.  Where MFF is not supported, the MFF line MUST NOT be included in the FEAT response.</t>
				<figure>
					<artwork>
mff-feat = SP "MFF" SP factlist CRLF
factlist = 1*( factname ";" )
	</artwork>
				</figure>
				<t>The initial space shown in the mff-feat response is that required by the FEAT command.</t>
				<section title="Example FEAT responses">
					<figure>
						<artwork>
C> feat
S> 211- &lt;any descriptive text>
S>  ...
S>  MFF ModifyTime;
S>  ...
S> 211 end</artwork>
					</figure>
					<t>This server-FTP process indicates that it supports MFF, and only supports modification of the last modification time of an object in the NVFS.</t>
					<figure>
						<artwork>
C> feat
S> 211- &lt;any descriptive text>
S>  ...
S>  MFF CreateTime;ModifyTime;WINDOWS-NT.SIS.Author;
S>  ...
S> 211 end</artwork>
					</figure>
					<t>This server-FTP process indicates that it supports MFF, and supports modification of the creation time, last modification time, and an operating system specific fact called &quot;WINDOWS-NT.SIS.Author&quot; of an object in the NVFS.</t>
					<t>
The ellipses indicate place holders where other features may be
included, and are not required.  The one space indentation of the
feature lines is mandatory <xref target="RFC2389"/>.
</t>
				</section>
			</section>
			<section title="MFF Examples">
				<t>To modify the creation time of a file called &quot;Sheila.txt&quot; to July 17, 2002 21:22:30,</t>
				<figure>
					<artwork>
C> MFF CreateTime=20020717212230; Sheila.txt
S> 213 CreateTime=20020717212230; Sheila.txt
</artwork>
				</figure>
				<t>To modify the permissions on a Unix-based NVFS for the file called &quot;Bob.txt&quot; to 777,</t>
				<figure>
					<artwork>
C> MFF UNIX.perms=777; Bob.txt
S> 213 UNIX.perms=777; Bob.txt
</artwork>
				</figure>
				<t>To modify the permissions on a Unix-based NVFS for the file called &quot;Fred.txt&quot; to 777, and the creation time to July 18, 2002 01:28:45,</t>
				<figure>
					<artwork>
C> MFF UNIX.perms=777;CreateTime=20020718012845; Bob.txt
S> 213 CreateTime=20020718012845;UNIX.perms=777; Bob.txt
</artwork>
				</figure>
				<t>If the same request was made to a server-FTP process that does not support the UNIX.perms fact,</t>
				<figure>
					<artwork>
C> MFF UNIX.perms=777;CreationTime=20020718012845; Bob.txt
S> 504 Parameter Not Implemented (UNIX.perms)
</artwork>
				</figure>
			</section>
		</section>
		<section title="IANA Considerations">
			<t>This specification makes use of some lists of values currently maintained by the IANA.  It does not add any values to any existing registries.</t>
			<section title="The OS Specific fact registry">
				<t>The MFF command reuses the OS Specific fact registry that is used by the MLSx commands as detailed in <xref target="I-D.ietf-ftpext-mlst"/>
				</t>
				<t>
The OS names for the OS portion of the fact name must be taken from the IANA's list of registered OS names.  To add a fact name to this OS specific registry of OS specific facts, an applicant must send to the IANA a request, in which is specified the OS name, the OS specific fact name, a definition of the syntax of the fact value, which must conform to the syntax of a token as given in this document, and a specification of the semantics to be associated with the particular fact and its values.  Upon receipt of such an application, and if the combination of OS name and OS specific fact name has not been previously defined, the IANA will add the specification to the registry.
</t>
				<t>
Any examples of OS specific facts found in this document are to be treated as examples of possible OS specific facts, and do not form a part of the IANA's registry merely because of being included in this document.
</t>
			</section>
		</section>
		<section title="Security Considerations">
			<t>
No significant security issues, not already present in the FTP protocol, are believed to have been created by this extension.
</t>
		</section>
	</middle>
	<back>
		<references>
			<reference anchor="RFC0959">
				<front>
					<title abbrev="File Transfer Protocol">File Transfer Protocol</title>
					<author initials="J." surname="Postel" fullname="J. Postel">
						<organization>Information Sciences Institute (ISI)</organization>
					</author>
					<author initials="J." surname="Reynolds" fullname="J. Reynolds">
						<organization/>
					</author>
					<date month="October" year="1985"/>
				</front>
				<seriesInfo name="STD" value="9"/>
				<seriesInfo name="RFC" value="959"/>
				<format type="TXT" octets="151249" target="ftp://ftp.isi.edu/in-notes/rfc959.txt"/>
			</reference>
			<reference anchor="RFC2119">
				<front>
					<title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
					<author initials="S." surname="Bradner" fullname="Scott Bradner">
						<organization>Harvard University</organization>
					</author>
					<date month="March" year="1997"/>
				</front>
				<seriesInfo name="BCP" value="14"/>
				<seriesInfo name="RFC" value="2119"/>
				<format type="TXT" octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"/>
				<format type="HTML" octets="15902" target="http://xml.resource.org/public/rfc/html/rfc2119.html"/>
				<format type="XML" octets="5647" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"/>
			</reference>
			<reference anchor="RFC2234">
				<front>
					<title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
					<author initials="D.H." surname="Crocker" fullname="David H. Crocker">
						<organization>Internet Mail Consortium</organization>
					</author>
					<date month="November" year="1997"/>
				</front>
				<seriesInfo name="RFC" value="2234"/>
				<format type="TXT" octets="24265" target="ftp://ftp.isi.edu/in-notes/rfc2234.txt"/>
			</reference>
			<reference anchor="RFC2389">
				<front>
					<title abbrev="Feature negotiation mechanism">Feature negotiation mechanism for the File Transfer Protocol</title>
					<author initials="P." surname="Hethmon" fullname="Paul Hethmon">
						<organization>Hethmon Brothers</organization>
					</author>
					<date month="August" year="1998"/>
				</front>
				<seriesInfo name="RFC" value="2389"/>
				<format type="TXT" octets="18536" target="ftp://ftp.isi.edu/in-notes/rfc2389.txt"/>
				<format type="HTML" octets="30752" target="http://xml.resource.org/public/rfc/html/rfc2389.html"/>
				<format type="XML" octets="17755" target="http://xml.resource.org/public/rfc/xml/rfc2389.xml"/>
			</reference>
			<reference anchor="I-D.ietf-ftpext-mlst">
				<front>
					<title>Extensions to FTP</title>
					<author initials="R" surname="Elz" fullname="Robert Elz">
						<organization/>
					</author>
					<author initials="P" surname="Hethmon" fullname="Paul Hethmon">
						<organization/>
					</author>
					<date month="April" day="2" year="2002"/>
				</front>
				<seriesInfo name="Internet-Draft" value="draft-ietf-ftpext-mlst-15"/>
				<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-15.txt"/>
			</reference>
		</references>
		<section title="Acknowledgements">
			<t>
Thank you to the authors and editors of <xref target="I-D.ietf-ftpext-mlst"/> for the facts in their MLSx command which have been hijaaked (in the nicest possible way) by the MFF command herein.
</t>
			<t>
A big thanks for xml2rfc which greatly helped in the production of this document.
</t>
		</section>
	</back>
</rfc>
