bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk - 'inplace' feature ignores file's access flags (rea


From: Andrew J. Schorr
Subject: Re: [bug-gawk] gawk - 'inplace' feature ignores file's access flags (read-only)
Date: Wed, 17 Jun 2015 10:31:52 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jun 17, 2015 at 12:55:48PM +0200, Johannes Meixner wrote:
> By the way:
> 
> The -i functionality at least for my sed 4.1.5
> preserves only the normal file permissions
> but neither owner:group nor ACLs:
> ---------------------------------------------------------------
> root:/test# chmod a+w /test
> 
> jsmeix:/test$ sed -i -e 's/hello/foo/' hello
> 
> jsmeix:/test$ cat hello
> foo2
> 
> jsmeix:/test$ ls -li hello
> 719838 -rw-rw---- 1 jsmeix suse 5 Jun 17 12:39 hello
> 
> jsmeix:/test$ getfacl hello
> # file: hello
> # owner: jsmeix
> # group: suse
> user::rw-
> group::rw-
> other::---
> ---------------------------------------------------------------
> 
> Of course in this case when sed runs as jsmeix it cannot
> create a file with owner:group root:root.

The gawk extension also fails to preserve ACLs at the moment,
but it does attempt to preserve the owner, group, and permissions.
So ACL preservtion and signal trapping are the current shortcomings.
Patch contributions are welcome.

Regards,
Andy



reply via email to

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