X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsecurity%2Fexe_perm.sh;fp=scripts%2Fsecurity%2Fexe_perm.sh;h=d3b68143f60ceb1fee2c99750aa24b2465757c21;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=0000000000000000000000000000000000000000;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/scripts/security/exe_perm.sh b/scripts/security/exe_perm.sh new file mode 100644 index 00000000..d3b68143 --- /dev/null +++ b/scripts/security/exe_perm.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# exeperm sets the permissions to an executable value, as for a directory of +# binary files. (rwxr-xr-x for both directories and files) + +declare -a args=("$@") + +if [ -z "${args[*]}" ]; then + echo "no arguments provided." + exit 1; +fi + +for (( i=0; i < ${#args[*]}; i++ )); do + current="${args[i]}" +# echo "curr is $current" + + find -L "$current" -type d -exec chmod 755 {} ';' +# >/dev/null 2>/dev/null + find -L "$current" -type f -exec chmod 755 {} ';' +# >/dev/null 2>/dev/null +done +