You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
439 B
Plaintext
23 lines
439 B
Plaintext
8 months ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Show permissions and identities that impact the current working directory.
|
||
|
# On macOS libc cwd() can return EACCES after su or sudo.
|
||
|
# See also
|
||
|
# - https://github.com/ansible/ansible/pull/7078
|
||
|
# - https://github.com/python/cpython/issues/115911
|
||
|
|
||
|
set -o errexit
|
||
|
set -o nounset
|
||
|
set -o pipefail
|
||
|
|
||
|
whoami
|
||
|
groups
|
||
|
pwd
|
||
|
|
||
|
d=$(pwd)
|
||
|
while [[ "$d" != "/" && -n "$d" ]]; do
|
||
|
ls -ld "$d"
|
||
|
d=$(dirname "$d")
|
||
|
done
|
||
|
ls -ld /
|