WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> MDTM support in FTP plugin
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1340206008

Message started by Baires on Jun 20th, 2012 at 5:26pm

Title: MDTM support in FTP plugin
Post by Baires on Jun 20th, 2012 at 5:26pm
I need to maintain the timestamp on the files uploaded using SFTP. My SFTP server supports the MDTM command to do this, where after uploading the file, the FTP client uses the MDTM command to modify the timestamp on the uploaded file. Does Watchdirectory support this as an FTP client? If not, could it be added as a feature request?

Title: Re: MDTM support in FTP plugin
Post by Gert on Jun 21st, 2012 at 4:19pm
Sounds like a good suggestion. I will have a look.

Which timestamp should be changed and to what timestamp should it be set?

Title: Re: MDTM support in FTP plugin
Post by Baires on Jun 22nd, 2012 at 4:51pm
The way it works is this: in the official RFC (http://www.ietf.org/rfc/rfc3659.txt ), the MDTM command is only defined for querying the last modified timestamp of a file on the remote FTP server, so the FTP client issues the command MDTM filename and the server returns the "last modified" timestamp. Due to the lack of a method for preserving the timestamp of uploaded files, several FTP servers and clients have implemented an "unofficial" use of the MDTM command for setting, instead of querying, the timestamp. So the FTP client has an option for maintaining the timestamp of uploaded files, and if you enable it, after uploading the file to the server, it sends an MDTM command in the format MDTM timestamp filename, with the original timestamp of the file. The server, if it supports that feature, modifies the timestamp of the uploaded file as requested by the client.


Title: Re: MDTM support in FTP plugin
Post by Gert on Jun 23rd, 2012 at 7:47am
I think most servers support this.

My questions:
1 should the ATIME (last accessed/last read time) be set to the current timestamp
2 should the MTIME (last modified) be set to ??????

For MTIME, it can be set to the "last modified" or "creation time" or "highest (*)" of the uploaded file or "current timestamp" (same as ATIME).

(*) The most current of "last modified" and "creation time".

Title: Re: MDTM support in FTP plugin
Post by Gert on Jul 6th, 2012 at 7:49am
I have implemented this for the next beta, probably out somewhere this weekend.

Title: Re: MDTM support in FTP plugin
Post by Gert on Jul 9th, 2012 at 11:48am
Can you please try

www.watchdirectory.net/beta/SetupWD467BETA3_9.exe

Just install "on top" of your current release so it will keep your settings and tasks.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.