GNU bug report logs - #34700
rm refuses to remove files owned by the user, even in force mode

Previous Next

Package: coreutils;

Reported by: Nicolas Mailhot <nicolas.mailhot <at> laposte.net>

Date: Fri, 1 Mar 2019 13:38:02 UTC

Severity: wishlist

Tags: notabug

Full log


Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Mailhot <nicolas.mailhot <at> laposte.net>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>,
 Coreutils <bug-coreutils <at> gnu.org>
Subject: Re: bug#34700: rm refuses to remove files owned by the user, even in
 force mode
Date: Mon, 04 Mar 2019 08:42:58 +0100
Le 2019-03-03 16:48, L A Walsh a écrit :
> On 3/3/2019 4:43 AM, Erik Auerswald wrote:
>> Hi,
>> 
>> On 3/3/19 09:40, L A Walsh wrote:
>> 
>>> On 3/2/2019 11:31 AM, Bob Proulx wrote:
>>> 
>>>> But regardless of that it does not change the fact that the entire
>>>> purpose of read-only directories is to prevent removing and renaming
>>>> of files within them.
>>>> 
>>>> 
>>> ----
>>>      But not by the user owning them.
>>> 
>> 
>> The rationale given by the Go developers is to prevent downloaded test
>> code to remove or alter files in the modules directory, not to prevent
>> the user from doing that.
>> 
> ----
>     I'm not familiar w/go, or why the user wants to purge something
> that sounded equivalent to a web-cache, vs. the local extension-source
> storage.

The user (me) just wants to clean up files in his own home directory 
without special complications.

>> The Go developers implemented "go clean -modcache" for that purpose.
>> https://github.com/golang/go/issues/27161#issuecomment-415213240
>> https://tip.golang.org/cmd/go/#hdr-Remove_object_files_and_cached_files

And having files that need special commands to be modified is quite 
umconfortable

Not to mention the command may have been uninstalled leaving files on 
disk, is quite new, buggy, and full of unnexpected side effects (because 
it would have been too much to ask for a command that "just" cleans up 
the cache).

> ----
>     If there is a utilities for what the user needs, why are they 
> wanting
> 'rm' to do it?  Is it just that they don't know about the util, or
> maybe  the
> util has constraints on its use to delete the source if the cached 
> version
> is deleted?  I don't know.  I do know that Google isn't known for 
> following
> common sense standards and like to force its own way on people, so I 
> don't
> know why the util isn't "working" for the original poster.

It isn't "working". Besides the ro mode is not supposed to protect the 
files from users, it's supposed to protect the cache files from go unit 
tests, because google has moved go resources from plain directories to 
zip files, and code that attempts to manipulate zip files as if they 
were directories fails badly

As one of the Go devs commented in one of the tickets after arguing for 
the ro change "I'm surprised rm is not smart enough to do the right 
thing" (meaning remove everything when asked without requiring a 
permission change, since the user owns everything)

Regards,

-- 
Nicolas Mailhot




This bug report was last modified 6 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.