bugGNU Core Utilities - Bugs: bug #9185, rm calls access() but it shouldn't


You are not allowed to post comments on this tracker with your current authentication level.

bug #9185: rm calls access() but it shouldn't

Submitted by:  Tim Waugh <twaugh>
Submitted on:  Wed 02 Jun 2004 11:52:28 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 21 Dec 2004 07:29:34 AM UTC, comment #1:

rm has been fixed to invoke lstat before access, to avoid following symlinks into never-never-land.

Paul Eggert <eggert>
Project Administrator
Wed 02 Jun 2004 11:52:28 AM UTC, original submission:

See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124699

The rm program calls access() on the target file before calling unlink() on it. This is unnecessary (unlink should tell you everything you need to know), and may hang rm (it may be a symlink pointing to something on an unreachable NFS server).
To reproduce the problem:
1. Mount a directory off an NFS server without any special options
(so no -ointr, for example)
2. Make a symlink from somewhere outside that mountpoint to
somewhere inside that mountpoint.
3. Power off the NFS server
4. Try and rm the symlink.

Tim Waugh <twaugh>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.


Please enter the title of George Orwell's famous dystopian book (it's a date):



Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
Tue 21 Dec 2004 07:29:34 AM UTC eggert StatusNone => Fixed
    Open/ClosedOpen => Closed

Back to the top

Powered by Savane 3.3