Bug 19550

Summary: tmpwatch removes fresh files
Product: [Retired] Red Hat Linux Reporter: lvv <lvv>
Component: tmpwatchAssignee: Preston Brown <pbrown>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dr, rh-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-07 20:36:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
based on tmpwatch-2.6.2-2 (rawhide) none

Description lvv 2000-10-22 16:32:31 UTC
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.

Comment 1 Preston Brown 2000-11-28 20:16:04 UTC
We respectfully disagree.

Comment 2 Enrico Scholz 2001-02-07 20:35:33 UTC
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.

Comment 3 Enrico Scholz 2001-02-07 20:36:22 UTC
Created attachment 9299 [details]
based on tmpwatch-2.6.2-2 (rawhide)

Comment 4 Preston Brown 2001-03-09 05:16:21 UTC
this is a sane patch.  Applied to version 2.7 and later.  Thank you.