Created
June 25, 2021 20:57
-
-
Save alecjacobson/348092cd4e0921179181f688f5a0547a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -lt 2 ] ; then | |
echo "mine [username] [file/folder]" | |
echo "or" | |
echo "mine [username] [file/folder] [action]" | |
exit 1 | |
fi | |
if [ "$#" -ne 3 ] ; then | |
action="list,add_file,search,delete,add_subdirectory,delete_child,file_inherit,directory_inherit,read,write,delete,append,execute" | |
else | |
action="$3" | |
fi | |
# change the ACL on a mac os x folder so that everyone _except_ [user] cannot read | |
echo -e "$1 allow $action\neveryone deny $action" | chmod -E $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment