emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#54338: closed (enhancement (documentation): explain permission tests


From: GNU bug Tracking System
Subject: bug#54338: closed (enhancement (documentation): explain permission tests in "test")
Date: Fri, 11 Mar 2022 12:52:02 +0000

Your message dated Fri, 11 Mar 2022 12:51:12 +0000
with message-id <75cef3c9-0129-bc8e-421a-624017f10822@draigBrady.com>
and subject line Re: bug#54338: enhancement (documentation): explain permission 
tests in "test"
has caused the debbugs.gnu.org bug report #54338,
regarding enhancement (documentation): explain permission tests in "test"
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54338: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54338
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: enhancement (documentation): explain permission tests in "test" Date: Fri, 11 Mar 2022 11:42:13 +0100
I noticed that "test -r file" returns success when called as root for a file
with these permissions:
"--w-------" (see also https://stackoverflow.com/q/71435657/6607497)

The documentation simply states:
‘-r FILE’
     True if FILE exists and read permission is granted.

Doing an strace it seems stat() is used to check the permissions (well, what
about ACLs, just in case?)

I think there should be a better explanatiomn how the permission tests work,
especially when called as "root".

(Report based on coreutils-8.32-150300.3.5.1 from openSUSE Leap 15.3)




--- End Message ---
--- Begin Message --- Subject: Re: bug#54338: enhancement (documentation): explain permission tests in "test" Date: Fri, 11 Mar 2022 12:51:12 +0000 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0
On 11/03/2022 10:42, Ulrich Windl wrote:
I noticed that "test -r file" returns success when called as root for a file
with these permissions:
"--w-------" (see also https://stackoverflow.com/q/71435657/6607497)

The documentation simply states:
‘-r FILE’
      True if FILE exists and read permission is granted.

Doing an strace it seems stat() is used to check the permissions (well, what
about ACLs, just in case?)

I think there should be a better explanatiomn how the permission tests work,
especially when called as "root".

(Report based on coreutils-8.32-150300.3.5.1 from openSUSE Leap 15.3)

I agree the current docs are ambiguous.
I'll apply the attached later to address this.

thanks,
Pádraig

Attachment: test-access.diff
Description: Text Data


--- End Message ---

reply via email to

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