mod_site_utime

Posted by Jim Jagielski on Monday, February 11. 2008 in Programming

I've used proftpd as my preferred FTP server for quite awhile now (although I do have a few sites running mod_ftp as well). I've also been baselining Transmit as my main OS X FTP client as well, supplementing the various CLI FTP clients as well. In any case, I've noticed that Transmit, after uploading files, tries to reset the timestamp on those files. The rub is that, except for the IETF draft, there really is no standard way to do this under FTP. There is overloading the MDTM FTP command, which some clients and servers support. There is also the SITE UTIME command as well. Unfortunately, there appears to be 2 popular formats for SITE UTIME:
SITE UTIME YYYYMMDDhhmm[ss] path
and
SITE UTIME path YYYYMMDDhhmm[ss] YYYYMMDDhhmm[ss] YYYYMMDDhhmm[ss] UTC
What is even more unfortunate is the proftpd doesn't support the MDTM overload and only supports the 1st flavor of SITE UTIME, whereas Transmit (and others) use the 2nd SITE UTIME flavor. So using the mod_site_misc.c proftpd contrib module as a starting point, I've crafted mod_site_utime.c. It's designed to just implement SITE UTIME (not other SITE commands, like mod_site_misc), and to add some extra flexibility on what is provided in mod_site_misc, like supporting timestamps with seconds values, supporting both format flavors and some basic error checking. I hear that later versions of proftpd will support the IETF drafts, but until that time, mod_site_utime just may be quite useful for a number of people.

The author does not allow comments to this entry

Quicksearch

Search for an entry in IMO:

Did not find what you were looking for? Post a comment for an entry or contact us via email!