Skip to main content

fixperm.sh for /Users/Shared

Usage of resources from several profiles:

/Users/Shared/tech/scripts/fixperm.sh
#!/bin/bash

#
# This script will restore permissions on shared directories
#

#
# 2023-05-24  + init /A
# 2023-06-06  * changed to use 'find' /A
# 2023-10-22  + set executables to bash/python scripts /A
#

dir="/Users/Shared"

# for MacOS v13.3.1 (Ventura)
chgrp -R -v staff ${dir}

find ${dir} -type d -exec chmod 0770 {} \+
find ${dir} -type f -exec chmod 0660 {} \+
find ${dir} -name '*.sh'  -type f -exec chmod 0770 {} \+
find ${dir} -name '*.py*' -type f -exec chmod 0770 {} \+