GNU bug report logs - #12366
[gnu-prog-discuss] Writing unwritable files

Previous Next

Package: coreutils;

Reported by: Paolo Bonzini <bonzini <at> gnu.org>

Date: Thu, 6 Sep 2012 12:14:01 UTC

Severity: normal

Done: Jim Meyering <meyering <at> hx.meyering.net>

Bug is archived. No further changes may be made.

Full log


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

From: Jim Meyering <jim <at> meyering.net>
To: Paolo Bonzini <bonzini <at> gnu.org>
Cc: 12366 <at> debbugs.gnu.org, gnu-prog-discuss <at> gnu.org,
	John Darrington <john <at> darrington.wattle.id.au>
Subject: Re: bug#12366: [gnu-prog-discuss] Writing unwritable files
Date: Thu, 06 Sep 2012 15:27:01 +0200
Paolo Bonzini wrote:
> [For bug-coreutils: the context here is that sed -i, just like perl -i,
> breaks hard links and thus destroys the content of files with 0400
> permission].

Did I misunderstand how "destroy" is used above?

    $ echo important > k
    $ chmod a-w k
    $ sed -i s/./X/ k
    $ cat k
    XXXXXXXXX
    $ ls -og k
    -r--------. 1 10 Sep  6 15:23 k




This bug report was last modified 12 years and 232 days ago.

Previous Next


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