citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

group_permissions (267B)


      1 #!/usr/bin/env bash
      2 
      3 DIR="$1"
      4 GRP="$2"
      5 if [ -z "$DIR" ] || [ -z "$GRP" ]; then
      6   echo "usage: $(basename $0) <dir> <group>"
      7   exit 1
      8 fi
      9 
     10 chgrp -R "$GRP" "$DIR"
     11 chmod -R g+w "$DIR"
     12 find "$DIR" -type d -exec chmod 2775 {} \;
     13 find "$DIR" -type f -exec chmod ug+rw {} \;