GNU bug report logs -
#34700
rm refuses to remove files owned by the user, even in force mode
Previous Next
Full log
View this message in rfc822 format
On 3/1/19 6:48 AM, Nicolas Mailhot wrote:
> Hi,
>
> 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
>
> That means cleaning up cache artefacts with rm does not work anymore
> https://github.com/golang/go/issues/30502
>
> I understand the need to protect read only files (even though they're
> supposed to have been created by a user decision, not by user-hostile
> tools). However should not rm remove the files anyway in force (-f) mode
> without an explicit chmod first? Do it without bothering me is why -f
> exists after all.
The behavior of -f is specified by POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html
and is specified to suppress prompts and avoid diagnostics on missing
files, but NOT a means to force deletion via changing directory
permissions. For that, you'd need a new option, because we can't change
the long-specified meaning of -f without breaking scripts.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
This bug report was last modified 6 years and 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.