echo "" echo "------------------------" echo "Starting Permissions Fix" echo "------------------------" echo "" user=$1 group=$2 chdir=$3 timestamp=`date ''+%m-%d-%Y_%H:%M:%S''` echo $timestamp find $chdir -print0 | xargs -0 chown $user:$group | ls > /root/changePermissions.log find $chdir -type f -print0 | xargs -0 chmod 0664 | ls > /root/changePermissions.log find $chdir -type d -print0 | xargs -0 chmod 2771 | ls > /root/changePermissions.log echo Owner changed to: $user echo Group changed to: $group if [ $chdir = "." ]; then echo Directory: $PWD else echo Directory: $chdir fi echo "" echo "----------------------" echo "End of Permissions Fix" echo "----------------------" echo ""