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: Thu, 11 Jun 2015 08:38:09 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

On Thu, Jun 11, 2015 at 02:17:14PM +0200, Johannes Meixner wrote:
> On Jun 10 10:43 Andrew J. Schorr wrote (excerpt):
> >I think your bash examples are not comparable.
> 
> My bash examples were only meant to show generally
> what could be done when one wants to change the content
> of a file when working as normal user versus file owner
> versus root.

Thanks for sharing your thoughts.  But I really don't think we should focus on
what happens in bash when a user tries to change a file.  We are not in fact
changing the contents of a file; we are replacing it with a new file.  From a
filesystem perspective, that's a completely different operation.  That's why
none of the tools with inplace editing will respect the permissions on the
file.  The directory permissions are the relevant ones.

Anybody who is using inplace editing should be sophisticated enough
to understand what is happening.  This is not a tool for an average,
unsophisticated user.

The original issue that motivated this thread was a user's desire to
have inplace editing work on only a subset of the files supplied to
awk.  She thought that turning off the write perms could be a backdoor
way of disabling inplace editing.  That is not a valid solution to
the problem.

Regards,
Andy



reply via email to

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