Geoff Clare wrote, on 19 Aug 2020:
>
> > --
> > (0004926) geoffclare (manager) - 2020-08-19 09:22
> > https://austingroupbugs.net/view.php?id=1392#c4926
> > --
>
> > I think we should issue a "standard is silent" interpretation, thus
> > allowing both behaviours for Issue 7, but we should make a change in Issue
> > 8 to require the BSD behaviour.
>
> I started looking into a wording change for this, but I'm not too
> keen on where it would end up. It would have a particular difference
> from chmod that would "stick out like a sore thumb", which is that
> when '=' is used without a "who", find ignores the umask but chmod
> uses it.
>
> Is that what BSD find does? Or is it consistent with chmod here
> (contrary to what the standard requires)?
This got answered via a bug note (4941): macOS (which uses BSD find)
is consistent with chmod.
> Perhaps we should allow the difference but recommend against it.
I think I would prefer just to require consistency with chmod in Issue 8.
The difference from chmod violates the principle of least surprise.
Another reason to disallow ignoring the umask for '=' without a "who"
is that this makes it identical to 'a=', thus reducing the available
functionality for no reason.
I propose:
The mode argument is used to represent file mode bits. It shall
be processed in an identical matter to the symbolic_mode operand
described in chmod, except that:
1. The changes to file mode bits shall be applied to a template instead
of to any files. The template shall initially have all file mode
bits cleared.
2. The op symbol '-' cannot be the first character of mode;
this avoids ambiguity with the optional leading . Since
the initial mode is all bits off, there are not any symbolic modes
that need to use '-' as the first character.
If the is omitted, ...
with a new paragraph in RATIONALE:
Earlier versions of this standard were silent regarding whether the
-perm primary takes into account the file mode creation mask
when the op symbols '+' and '-' are used without who
being specified, and required the mask to be disregarded when the
op symbol '=' is used without who. The latter resulted
in a surprising inconsistency with chmod, and also meant that
'=' without who just worked the same as '=' with a who
of 'a', disallowing useful functionality. Some implementations used
the mask anyway, despite the requirement not to. The standard now
requires that the way find handles these op symbols is
consistent with chmod. Applications that need the old behavior
can simply use '=' with a who of 'a' instead of without
who.
--
Geoff Clare
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England