#!/bin/bash
for DIR in /data/*
do
PERM=`ls -ld ${DIR} | cut -f1 -d" "`
if [ ${PERM} != "drwxrwxrwx" ]
then
chmod 777 ${DIR}
fi
done
#!/bin/bash
for DIR in /data/*
do
PERM=`ls -ld ${DIR} | cut -f1 -d" "`
if [ ${PERM} != "drwxrwxrwx" ]
then
chmod 777 ${DIR}
fi
done