#!/bin/bash SETACLS=clear #SETACLS=set rm -fr tst mkdir tst if [ -n "$SETACLS" ]; then for g in $(id -G); do if [ "$SETACLS" = "clear" ]; then setfacl -m d:g:$g:0 tst elif [ "$SETACLS" = "set" ]; then setfacl -m d:g:$g:rwx tst fi done fi getfacl tst # Don't copy notepad.exe because that will preserve the file's ACLs # and will cause the .exe suffix to be added regardless of the # directory's ACLs. cat "$(cygpath -Wua)"/notepad.exe > tst/tempfile.tmp getfacl tst/tempfile.tmp ls -l tst ./tstren ls -l tst