Bug 190691 - tmpwatch deletes symlinks but doc say it will not
Summary: tmpwatch deletes symlinks but doc say it will not
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tmpwatch
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-04 14:57 UTC by Eirik Thorsnes
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 2.9.7-1
Clone Of:
Environment:
Last Closed: 2006-05-06 18:56:02 UTC
Type: ---
Embargoed:


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

Description Eirik Thorsnes 2006-05-04 14:57:43 UTC
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:

Allways

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 14:57:43 UTC
Created attachment 128605 [details]
Do not accept symlink for deletion

Comment 2 Miloslav Trmač 2006-05-06 17:44:11 UTC
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 17:59:23 UTC
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 18:56:02 UTC
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.