bug-coreutils
[Top][All Lists]
Advanced

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

bug#34700: rm refuses to remove files owned by the user, even in force m


From: Bob Proulx
Subject: bug#34700: rm refuses to remove files owned by the user, even in force mode
Date: Fri, 1 Mar 2019 23:18:42 -0700
User-agent: Mutt/1.10.1 (2018-07-13)

Nicolas Mailhot wrote:
> For their own reasons, the Go maintainers have decided the user Go cache
> will now be read-only.
> https://github.com/golang/go/issues/27161#issuecomment-433098406

Not wise.

> That means cleaning up cache artefacts with rm does not work anymore
> https://github.com/golang/go/issues/30502

Users count upon non-writable directories to prevent files from being
deleted.  I am confident that changing rm to delete contents of
non-writable directories would produce bug reports.  And worse it
would have resulted in data loss in those cases.  Weigh data loss
against inconvenience intentionally created.

They have intentionally done this to prevent actions such as rm -rf on
the path.  That is the entire purpose of making directories read-only,
to prevent the contents from being removed or renamed.

However regardless of intentions and design if one really wants to
smash it then this is easily scripted.  No code modifications are
needed.

  #!/bin/sh
  chmod -R u+w $1
  rm -rf $1

Bob





reply via email to

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