Bug 19550 - tmpwatch removes fresh files
Summary: tmpwatch removes fresh files
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-22 16:32 UTC by lvv
Modified: 2007-04-18 16:29 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2001-02-07 20:36:26 UTC


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

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.


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