shell - how to check a directory has a read/write permission -


i have directory shown

d-wx--x--x 2 bcheudev bcheudev  4096 jun 18 06:16 test 

which shows directory not have read permission.

but when check same through shell script it's giving result dir test has read permission.

export in_dir=$mmhome/test    if [ -d ${in_dir}  ]            if [ ! -r ${in_dir} ]                  echo "${in_dir} directory not readable.">>$log_name           exit 255       fi     else        echo "${in_dir} directory not exists.">>$log_name    exit 255     fi 

inside second if it's not going.

please help

remember root have read permissions.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -