Facing problem in testing the file permission
script name: filetest.sh
if [ $# -eq 0 ] ; then
echo " You didn't enter any argument"
elif [ ! -e $1 ] ; then
echo " file not exist"
elif [ ! -r $1 ] ; then
echo " file not readable"
elif [ ! -w $1 ] ; then
echo " file not writable"
echo " file both readable and writable"
$ ./filetest filename
but it showing.....both readable and writable
for those file which are not readable and writable...