[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm -rf behaviour (7.1)
From: |
Jim Meyering |
Subject: |
Re: rm -rf behaviour (7.1) |
Date: |
Sun, 22 Mar 2009 16:44:38 +0100 |
Mark Rosenstand wrote:
> Hi Jim and the list,
>
> I just downloaded and extracted a tarball with restrictive permissions.
> Trying to rm -rf'ing the directory goes
>
> rm: cannot remove `SQUIRREL2': Permission denied
>
> After recursively chmod'ing it to 700, rm succeeds.
>
> The tarball in question can be found at
> http://dl.sourceforge.net/sourceforge/squirrel/squirrel_2.2.2_stable.tar.gz
>
> Is this behaviour intentional?
Yes. rm -rf is required to act that way. I.e.,
rm -rf must fail to remove a non-empty directory that is not writable.
For example,
$ mkdir -p d/d; chmod u-w d; rm -rf d
rm: cannot remove directory `d/d': Permission denied