Would anyone be kind enough to explain whyWhy does one command workswork and the other doesn’t? I have found some remotely related articles, but I failed to understand them.
$ sudo ls -la /tmp/restricted
total 12
drwxr-x---. 2 root root 42 Mar 17 17:40 .
drwxrwxrwt. 12 root root 12288 Mar 17 17:37 ..
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo1
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo2
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo3
$ sudo ls -a /tmp/restricted/foo*
ls: cannot access /tmp/restricted/foo*: No such file or directory
$
Note that if I change the privileges on /tmp/restricted to 755 instead of 750, both commands succeed:
$ sudo chmod 755 /tmp/restricted/
$ sudo ls -la /tmp/restricted
total 12
drwxr-xr-x. 2 root root 42 Mar 17 17:40 .
drwxrwxrwt. 12 root root 12288 Mar 17 17:37 ..
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo1
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo2
-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo3
$ sudo ls -a /tmp/restricted/foo*
/tmp/restricted/foo1 /tmp/restricted/foo2 /tmp/restricted/foo3
$
Thank you!