From 4242c4605a1de8d3c282e6a5a0b16977b34789ec Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Fri, 19 Dec 2014 18:46:35 -0800 Subject: Comment on the cause for 'group executable' == no --- tests/test_which.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/test_which.py b/tests/test_which.py index ec9fbb8..bda3333 100644 --- a/tests/test_which.py +++ b/tests/test_which.py @@ -188,6 +188,10 @@ class TestCaseWhich(PexpectTestCase.PexpectTestCase): shutil.copy(bin_echo, bin_path) isroot = os.getuid() == 0 for should_match, mode in ( + # note that although the file may have matching 'group' or + # 'other' executable permissions, it is *not* executable + # because the current uid is the owner of the file -- which + # takes precedence (False, 0o000), # ----------, no (isroot, 0o001), # ---------x, no (isroot, 0o010), # ------x---, no -- cgit v1.2.1