bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm -f and unexecutable directories


From: Bob Proulx
Subject: Re: rm -f and unexecutable directories
Date: Sat, 8 Nov 2003 18:10:06 -0700
User-agent: Mutt/1.3.28i

Ed Avis wrote:
> Jim Meyering wrote:
> >I looked into it a little, and am now even less enthusiastic. Doing
> >it right would mean changes that are way too invasive. They'd have
> >to handle failed chdir, opendir, readdir and retry after a chmod.
> 
> Well - that's one way to do it, the other way is to chmod every file
> before doing anything with it.  But that might be slow (I haven't
> benchmarked).

But the directory containing the file would need the chmod, not the
file itself.  The permission of the file has nothing to do with
whether you can remove the file or not.  It is the permission of the
directory containing the file which controls that.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]