From: Pádraig Brady
Date: Fri, 11 Mar 2022 12:47:05 +0000 (+0000)
Subject: doc: test: clarify that -rwx don't just check perm bits
X-Git-Tag: v9.1~32
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa53e73974d571d2ffaf9d3e6d74fc528aa4917f;p=thirdparty%2Fcoreutils.git
doc: test: clarify that -rwx don't just check perm bits
* src/test.c (usage): State that -rwx is determined by
user access, rather than permission bits.
* doc/coreutils.texi (Access permission tests): Likewise.
* man/test.x [SEE ALSO]: access(2).
Fixes https://bugs.gnu.org/54338
---
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 05dc5ee21f..c9243c6839 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -13451,7 +13451,7 @@ True if @var{file} exists and has its @dfn{sticky} bit set.
@item -r @var{file}
@opindex -r
@cindex readable file check
-True if @var{file} exists and read permission is granted.
+True if @var{file} exists and the user has read access.
@item -u @var{file}
@opindex -u
@@ -13461,12 +13461,12 @@ True if @var{file} exists and has its set-user-ID bit set.
@item -w @var{file}
@opindex -w
@cindex writable file check
-True if @var{file} exists and write permission is granted.
+True if @var{file} exists and the user has write access.
@item -x @var{file}
@opindex -x
@cindex executable file check
-True if @var{file} exists and execute permission is granted
+True if @var{file} exists and the user has execute access
(or search permission, if it is a directory).
@item -O @var{file}
diff --git a/man/test.x b/man/test.x
index 0adc35fee1..0db91dc9a7 100644
--- a/man/test.x
+++ b/man/test.x
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998-2022 Free Software Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License