From 0da0554e49b347edffe3dc100d6ec67d7f9e4904 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Wed, 12 Aug 2020 23:59:05 +0200
Subject: [PATCH] doc: clarify that 'find -perm +MODE' is unrelated to umask

* doc/find.texi (Test -perm pmode): Do the above.
* NEWS: Mention the change.

Reported by Mohamed Akram in
    https://sv.gnu.org/bugs/?58654
---
 NEWS          | 2 ++
 doc/find.texi | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/NEWS b/NEWS
index 5f741934..86198991 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ find -used works again.  This predicate was not working properly since adding
 the support for sub-second timestamp resolution for various predicates in
 FINDUTILS_4_3_3-1 back in 2007.
 
+#58654: doc: clarify that 'find -perm +MODE' is unrelated to umask
+
 #58458: doc: improve section 'Hard links', especially fix the description
         regarding 'find -L -samefile FILE'.
 
diff --git a/doc/find.texi b/doc/find.texi
index 4dde0156..1e4ab177 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -1222,6 +1222,10 @@ True if the file's mode bits match @var{pmode}, which can be
 either a symbolic or numeric @var{mode} (@pxref{File Permissions})
 optionally prefixed by @samp{-} or @samp{/}.
 
+Note that @var{pmode} starts with all file mode bits cleared, i.e.,
+does not relate to the process's file creation bit mask (also known
+as @command{umask}).
+
 A @var{pmode} that starts with neither @samp{-} nor @samp{/} matches
 if @var{mode} exactly matches the file mode bits.
 (To avoid confusion with an obsolete GNU extension, @var{mode}
-- 
2.28.0

