Bug 8987 - tmpwatch deletes file while in use
tmpwatch deletes file while in use
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch (Show other bugs)
6.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-30 12:16 EST by Simon Hill
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-14 14:20:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Simon Hill 2000-01-30 12:16:33 EST
tmpwatch deleted an iso image in /tmp
WHILE it was mounted at /mnt/cdrom via
loop device.
Comment 1 Jeff Johnson 2000-02-07 17:26:59 EST
Change the tmpwatch policy (probably by disabling) if you're going to put
unusual things in /tmp. There's no (easy) way that tmpwatch can discover that a
file is in use.
Comment 2 Simon Hill 2000-02-11 12:41:59 EST
I have to respectfully disagree with this. While in this instance, I was making
an unusual use of /tmp, there are a number problems with not checking whether
the file is open before deleting it.

As more and more commercial software is developed for Linux, /tmp may be used in
ways not expected. Even free software may use /tmp in ways you don't expect.

For example, Meta-HTML (www.metahtml.org) is a web-server which puts its session
database in /tmp by default.  Of course, once tmpwatch deletes it, it continues
to work ... but none of the other utilities designed to access the session
database will work.

While it may in INCONVENIENT to fix this, I doubt that it is difficult - the
code is in lsof.
Comment 3 Preston Brown 2000-02-14 14:20:59 EST
we have added a flag to use fuser to determine whether a file is open or not for
6.2.  However, this option is turned off by default.

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