[BusyBox] rm -rf confused by directories without "x" bit set.

Rob Landley rob at landley.net
Wed Nov 12 08:40:18 UTC 2003


On Wednesday 12 November 2003 02:14, Paul Dickson wrote:
> On Sun, 9 Nov 2003 13:22:30 -0600, Rob Landley wrote:
> > I ran buildroot as me (not as root), and it created a file that rm -rf
> > won't delete.
> >
> > [landley at dhcppc4 busybox]$ ./busybox rm -rf ../../../buildroot/build_i386
> > rm: unable to stat
> > `../../../buildroot/build_i386/staging_dir/lib/pkgconfig/openssl.pc':
> > Permission denied
> > rm: unable to remove
> >
> > ../../../buildroot/build_i386/staging_dir/lib/
> > total 4
> > drw-r--r--    2 landley  landley      4096 Nov  9 06:37 pkgconfig
> >
> > Any suggestions?
>
> Delete as root.

But I didn't _create_ it as root.

What I can do is "chmod -R 777 buildroot", wait for that to do its thing, and 
then rm -rf works fine.  Root access isn't required.

> I have the same problem from a normal RH9 system, this is not a busybox
> problem.

Then it's a bug i the gnu rm too.  I gave it -rf.  Recursive force.  It'll 
chmod a normal file until it can delete it, why won't it chmod a directory 
until it can delete its contents?

I'll look into whipping up a patch if I have time tomorrow...

> I not sure why openssl does this, but I'm leaving it until either I
> understand why the permissions are set this way or openssl fixes this.

My openssl build broke trying to read the file in that directory yesterday.  
Obviously it works for other people, though...?

Rob



More information about the busybox mailing list