Bug 19550 - tmpwatch removes fresh files
tmpwatch removes fresh files
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-10-22 12:32 EDT by lvv
Modified: 2007-04-18 12:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-07 15:36:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
based on tmpwatch-2.6.2-2 (rawhide) (3.96 KB, patch)
2001-02-07 15:36 EST, Enrico Scholz
no flags Details | Diff

  None (edit)
Description lvv 2000-10-22 12:32:31 EDT
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 15:16:04 EST
We respectfully disagree.
Comment 2 Enrico Scholz 2001-02-07 15:35:33 EST
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 15:36:22 EST
Created attachment 9299 [details]
based on tmpwatch-2.6.2-2 (rawhide)
Comment 4 Preston Brown 2001-03-09 00:16:21 EST
this is a sane patch.  Applied to version 2.7 and later.  Thank you.

Note You need to log in before you can comment on or make changes to this bug.