6d8ed90e66f66c6b75f5cdad44e58f2474445474
[feisty_meow.git] / scripts / security / exe_perm.sh
1 #!/bin/bash
2 # exeperm sets the permissions to an executable value, as for a directory of
3 # binary files.  (rwxr-xr-x for both directories and files)
4
5 declare -a args=("$@")
6
7 if [ -z "${args[*]}" ]; then
8   echo "no arguments provided."
9   exit 1;
10 fi
11
12 for (( i=0; i < ${#args[*]}; i++ )); do
13   current="${args[i]}"
14 #  echo "curr is $current"
15
16   find "$current" -type d -exec chmod 755 {} ';'
17 # >/dev/null 2>/dev/null
18   find "$current" -type f -exec chmod 755 {} ';'
19 # >/dev/null 2>/dev/null
20 done
21