I downloaded a list of files from ftp, and tmpwatch removed all files on the same day. Tmpwatch was started from default cron configuration in RH7.0 - tmpwatch 240 /tmp /var/tmp. Ftp (lftp) correctly preserved access and modification time (ftp server utime/mtime). Access and modification time will be preserved by many coping programs (for example ftp, cp a, mv and some other ), because m-time/u-time should show not when file was moved/copied into this particular location, but when it was actually modified/accessed. Default behavior of tmpwatch should be to check age of file by calculating maximum (newest) of ctime, utime and mtime.
We respectfully disagree.
I do not understand entirely, why tmpwatch should not make his decisions based on several times. Because I am controlling /usr/src/redhat/{BUILD,SPECS,SOURCES} with tmpwatch (this dirs are placed under /var/tmp), it happens that tmpwatch kills files from the SOURCES dir when I compile e.g. XFree86 and the build fails. I will append a patch allowing the concurrent usage of the --atime, --mtime or --ctime options. If tmpwatch will be used in such a way, the maximum of the given times will be taken as base for the decision. The default behavior won't be changed so it should fit in current configuration without problems.
Created attachment 9299 [details] based on tmpwatch-2.6.2-2 (rawhide)
this is a sane patch. Applied to version 2.7 and later. Thank you.