Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 190691 - tmpwatch deletes symlinks but doc say it will not
tmpwatch deletes symlinks but doc say it will not
Product: Fedora
Classification: Fedora
Component: tmpwatch (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-05-04 10:57 EDT by Eirik Thorsnes
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 2.9.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-06 14:56:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Do not accept symlink for deletion (495 bytes, patch)
2006-05-04 10:57 EDT, Eirik Thorsnes
no flags Details | Diff

  None (edit)
Description Eirik Thorsnes 2006-05-04 10:57:43 EDT
Description of problem:

Version-Release number of selected component (if applicable):

2.9.6-1.2.1 (but probably others, e.g. RHEL4 tmpwatch-2.9.1-1)

How reproducible:


Steps to Reproduce:
1. Make symlinks to files or directories. 
2. Run tmpwatch (without --all option) on directory with symlinks that is older
than specified.

Actual results:

Symlinks deleted

Expected results:

Symlinks not deleted

Additional info:

Man page says: 
"... only removes empty directories and regular files."

Attached briefly tested patch which corrects this.
Comment 1 Eirik Thorsnes 2006-05-04 10:57:43 EDT
Created attachment 128605 [details]
Do not accept symlink for deletion
Comment 2 Miloslav Trmač 2006-05-06 13:44:11 EDT
I'd prefer just updating the documentation, I can't see any reason not to remove
the symbolic links.

Have you encountered a case where removing symbolic links is not desirable?
Comment 3 Eirik Thorsnes 2006-05-06 13:59:23 EDT
Yes, we use tmpwatch to clean a temporary work directory in high-performance
computing (a common setup in HPC). The users frequently set up directories and
symlinks in the work area in advance of starting their jobs. Having to recreate
the symlinks each time the tmpwatch has run through is a hassle for the users.
As the symlinks takes up almost no space, the users see it as natural that it
should not be deleted.

You could of course add a --nosymlinks option (like the --nodirs option).
Comment 4 Miloslav Trmač 2006-05-06 14:56:02 EDT
I'm not too happy about adding yet another option, but it's probably the best
we can do; tmpwatch-2.9.7 (in rawhide) therefore supports --nosymlinks (-l).

Thanks for your report.

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