From 634455175a0919b0f40920ced8f6d1218f87e996 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@Kateryna)" Date: Sun, 9 Mar 2025 11:33:55 -0400 Subject: [PATCH] Add fix_chmod --- _home/private_dot_local/bin/executable_fix_chmod | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 _home/private_dot_local/bin/executable_fix_chmod diff --git a/_home/private_dot_local/bin/executable_fix_chmod b/_home/private_dot_local/bin/executable_fix_chmod new file mode 100644 index 0000000..64ad16e --- /dev/null +++ b/_home/private_dot_local/bin/executable_fix_chmod @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +DIR=${1:?Must supply path (use . for CWD)} + +find "${DIR}" -type d -exec chmod 775 '{}' \; \ +&& find "${DIR}" -type f -not -executable -exec chmod 664 '{}' \; \ +&& find "${DIR}" -type f -executable -exec chmod 775 '{}' \; +