Bug 1376 - Unnecessary error messages when tmpwatch can't lstat a file
Unnecessary error messages when tmpwatch can't lstat a file
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch (Show other bugs)
5.2
All Linux
low Severity low
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-01 04:18 EST by jve
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: 1999-04-08 13:12:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description jve 1999-03-01 04:18:24 EST
Recently, Cron sent me this little tidbit:

> Subject: Cron <root@proxy> /usr/sbin/tmpwatch 2400 /tmp
/var/tmp
>
>error: error: error: error: error: failed to lstat
/tmp/sort0388800000: No such file or directory
>failed to lstat /tmp/sort0388800001: No such file or
directory
>failed to lstat /tmp/sort0388800002: No such file or
directory
>failed to lstat /tmp/sort0388800003: No such file or
directory
>failed to lstat /tmp/sort0388800004: No such file or
directory

As it turns out, these files went away between tmpwatch
reading the directory and checking each file.

There's no reason to report this kind of error, is there?

After all, these are *temporary* files, subject to removal
at any time by the program that generated them.

Also, I don't know if this next problem has ever been fixed
since 4.2, but tmpwatch will never, ever delete an empty
directory, because in the process of checking the directory
for files, the atime gets changed.

So tmpwatch needs to save and restore the atime for any
sub-directory that it checks.

    John Van Essen <jve@gamers.org>
Comment 1 David Lawrence 1999-04-06 14:49:59 EDT
This is being assigned to a developer for further review.
Comment 2 Preston Brown 1999-04-08 13:12:59 EDT
you may now specify a --quiet or -q option to tmpwatch to make it not
warn you about these errors, if you prefer.  It is really a preference
thing.

Also, I have taken over maintenance of tmpwatch and fixed the other
bug you reported where directories were never removed because their
time was always getting updated.  The directory atime and mtime are
now restored after it is finished being processed.

These features are in tmpwatch-1.6-1 and later.

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