Re: rm -f and unexecutable directories

2003-11-09 Thread Ed Avis
On Sat, 8 Nov 2003, Bob Proulx wrote: [rm and unexecutable directories] >>the other way is to chmod every file before doing anything with >>it. >But the directory containing the file would need the chmod, not the >file itself. Sorry - I meant to say chmod every directory before doing anything w

Re: rm -f and unexecutable directories

2003-11-09 Thread Ed Avis
On Sat, 8 Nov 2003, Bob Proulx wrote: % mkdir -p fred/jim % chmod a-x fred/jim % rm -rf fred rm: cannot chdir from `fred' to `jim': Permission denied >>> >>>But by the action of your chmod you have specifically requested that >>>you do not want those files removed! >> >>But by spec

Re: rm -f and unexecutable directories

2003-11-08 Thread Bob Proulx
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 i

Re: rm -f and unexecutable directories

2003-11-08 Thread Ed Avis
On Sat, 8 Nov 2003, Jim Meyering wrote: -F, --really-force As --force but also change permissions if necessary. >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 chdi

Re: rm -f and unexecutable directories

2003-11-08 Thread Ed Avis
On Sat, 8 Nov 2003, Bob Proulx wrote: >>% mkdir -p fred/jim >>% chmod a-x fred/jim >>% rm -rf fred >>rm: cannot chdir from `fred' to `jim': Permission denied > >But by the action of your chmod you have specifically requested that >you do not want those files removed! But by specifying the -f opti

Re: rm -f and unexecutable directories

2003-11-08 Thread Bob Proulx
Ed Avis wrote: > Bob Proulx wrote: > > >>% mkdir -p fred/jim > >>% chmod a-x fred/jim > >>% rm -rf fred > >>rm: cannot chdir from `fred' to `jim': Permission denied > > > >But by the action of your chmod you have specifically requested that > >you do not want those files removed! > > But by speci

Re: rm -f and unexecutable directories

2003-11-08 Thread Jim Meyering
[EMAIL PROTECTED] (Bob Proulx) wrote: > Jim Meyering wrote: >> Ed Avis wrote: >> > In that case could I make a feature request for a new flag >> > >> > -F, --really-force >> > As --force but also change permissions if necessary. >> >> It's feasible. >> I'm not enthusiastic about thi

Re: rm -f and unexecutable directories

2003-11-08 Thread Bob Proulx
Ed Avis wrote: > % mkdir -p fred/jim > % chmod a-x fred/jim > % rm -rf fred > rm: cannot chdir from `fred' to `jim': Permission denied But by the action of your chmod you have specifically requested that you do not want those files removed! Therefore I for one will expect that you will not be abl

Re: rm -f and unexecutable directories

2003-11-08 Thread Ed Avis
On Sat, 8 Nov 2003, Jim Meyering wrote: >>-F, --really-force >>As --force but also change permissions if necessary. > >It's feasible. >I'm not enthusiastic about this, but not strongly opposed either. A few years ago there was a project called 'The Dammit Patch' to add a --dammit

Re: rm -f and unexecutable directories

2003-11-08 Thread Jim Meyering
Ed Avis <[EMAIL PROTECTED]> wrote: > In that case could I make a feature request for a new flag > > -F, --really-force > As --force but also change permissions if necessary. It's feasible. I'm not enthusiastic about this, but not strongly opposed either. Let's see if anyone else ha

Re: rm -f and unexecutable directories

2003-11-08 Thread Ed Avis
On Fri, 7 Nov 2003, Jim Meyering wrote: >>But since I own the directory I could change the permissions and then >>remove it. Shouldn't rm do this if I gave the 'force' option? >rm may not do that. POSIX prohibits it. In that case could I make a feature request for a new flag -F, --really-f

Re: rm -f and unexecutable directories

2003-11-07 Thread Jim Meyering
Ed Avis <[EMAIL PROTECTED]> wrote: > % mkdir -p fred/jim > % chmod a-x fred/jim > % rm -rf fred > rm: cannot chdir from `fred' to `jim': Permission denied > > But since I own the directory I could change the permissions and then > remove it. Shouldn't rm do this if I gave the 'force' option? I >

rm -f and unexecutable directories

2003-11-07 Thread Ed Avis
% mkdir -p fred/jim % chmod a-x fred/jim % rm -rf fred rm: cannot chdir from `fred' to `jim': Permission denied But since I own the directory I could change the permissions and then remove it. Shouldn't rm do this if I gave the 'force' option? I thought that would take all measures necessa