I am testing if my file has read permissions, by running this script as root:
#!/usr/bin/env bash FILE="/etc/shadow" if ! [ -r $FILE ]; then echo "Hello" fi exit 0
Ideally, script has to print
Hello as there is no Read permission. But, it is not happening.
ls -ltrh /etc/shadow ---------- 1 root root 7.1K Jun 7 06:59 /etc/shadow
What needs to be modified in script?