Keep original filedate on FTP uploads

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,006
Location
Maastricht
We are running Directadmin Custombuild 1.1 with Proftpd at this moment.

When a user uploads files with ftp today, the files will get the timestamp of today. But I would like for all ftp uploads to keep the original filedate as recorded on the clients computer.

So ftp uploads should not be date-touched (keep original date/timestamp).

How can I fix this?
 
ProFTPD and Timestamps:

Question: Why is the timestamp on my newly uploaded file wrong?
Answer: If by "wrong" you mean "different from the timestamp of that file on my client machine", then that is the expected behavior.

The modification timestamp on a file is not part of the data uploaded over the data connection when uploading a file. Timestamps like that are metadata for that file, not part of the bytes of the file itself. FTP does not supporting sending of timestamps as part of the upload transfer process. See below for a common follow-up question.

Question: Does ProFTPD support changing the timestamp on a file using the MDTM command? That's what my client does.
Answer: No.

See http://www.proftpd.org/docs/howto/Timestamps.html for more details.

p.s. There might be a patch or a module, which would allow to use MDTM command with ProFTPd. You'd better Google or ask in ProFTPd Mailing Lists.
 
Thanks for the answer. As far as I know pure-ftpd has no problems with this, so I will change to pure-ftpd then I think.;)
 
Back
Top