Code
abduct ~ $ sudo chmod 750 atest
abduct ~ $ cat atest
cat: atest: Permission denied
abduct ~ $ ./t.sh atest
I do not have permissions to read this file
abduct ~ $ sudo ./t.sh atest
I have permissions to read this file
abduct ~ $ stat atest
File: 'atest'
Size: 13 Blocks: 8 IO Block: 4096 regular file
Device: 809h/2057d Inode: 599083080 Links: 1
Access: (0750/-rwxr-x---) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-05-08 14:55:46.710654979 -0500
Modify: 2016-05-08 14:55:44.722654883 -0500
Change: 2016-05-08 14:56:11.918656199 -0500
Birth: -
abduct ~ $ cat t.sh
if [ -r "$1" ]
then
echo "I have permissions to read this file"
else
echo "I do not have permissions to read this file"
fi
http://www.tldp.org/LDP/abs/html/fto.html