[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: |
Sat, 2 Mar 2019 12:31:41 -0700 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Erik Auerswald wrote:
> Bob Proulx wrote:
> > 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
>
> To everyone considering the above "script": do not use it! It does not even
> guard against spaces in file names. Besides being dangerously buggy, it does
> not even solve the problem of deleting a file inside a read-only directory.
Obviously I typed that in extemporaneously on the spur of the moment.
I should have put an "untested" tag upon it.
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.
> I would suggest people with specific directories that inhibit deletion of
> files inside although they should not (e.g. a "cache") to deliberatly change
> the permissions of said directories prior to deleting files inside. Using a
> script like the above, even without the basic mistakes in the script, is
> quite dangerous.
I don't think we are in disagreement here.
Bob
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Nicolas Mailhot, 2019/03/01
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Eric Blake, 2019/03/01
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Bob Proulx, 2019/03/02
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Erik Auerswald, 2019/03/02
- bug#34700: rm refuses to remove files owned by the user, even in force mode,
Bob Proulx <=
- bug#34700: rm refuses to remove files owned by the user, even in force mode, L A Walsh, 2019/03/03
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Erik Auerswald, 2019/03/03
- bug#34700: rm refuses to remove files owned by the user, even in force mode, L A Walsh, 2019/03/03
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Nicolas Mailhot, 2019/03/04
- bug#34700: rm refuses to remove files owned by the user, even in force mode, Assaf Gordon, 2019/03/28