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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -