This commit is contained in:
2021-10-22 16:38:48 -04:00
parent 7a797f30da
commit 0b6e092c20
4 changed files with 116 additions and 482 deletions

View File

@@ -36,11 +36,12 @@ for path in "${paths[@]}"; do
echo -e "PATH\tUSER\tGROUP"
echo -e "$path\t$og_user\t$og_group"
if [[ "$group" != "smbgrp" || "$og_group" != "smbgrp" ]]; then
echo "$path is not world-accessible by the smbgrp group"
echo "$path is not world accessible by the smbgrp group"
ask_ok "Change $path group $og_group to smbgrp?" && group="smbgrp"
fi
done
ask_ok "Apply user: $user and group: $group to ${paths[*]} and all subdirs?" && \
chown -R "$user":"$group" "${paths[@]}"