Package: pure-ftpd
Version: 1.0.21-8

Pure-ftpd supports the "SITE UTIME" command, which allows the client to set the modification time of a file to a particular timestamp, expressed in UTC.

However, pure-ftpd passes the UTC timestamp directly to the operating system's utime() function, which is a bug, because utime() requires that the timestamp be in local time instead of UTC.

The end result is that, for example, if your server is in time zone US/Pacific, the "SITE UTIME" command sets the file's timestamp 7 hours ahead of what it should be.

See this page (which was written by someone else) for a confirmation:

 http://www.smartftp.com/support/kb/pureftpd-utime-bug-f2615.html

To fix the bug, pure-ftpd needs to convert UTC to local time. The fix is trivial on Linux: Just replace "mktime()" with "timegm()" in doutime() of ftpd.c (I've tested this and it works).

--
Robert L Mathews, Tiger Technologies



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to