# USER => user that should have access # GROUP => group that should have access if [ -z $1 ] then echo "usage: $0 " exit 1 fi if [ -z $2 ] then echo "usage: $0 " exit 1 fi if [ -z $3 ] then echo "usage: $0 " exit 1 fi echo "file1.txt" > $3/file1.txt echo "file2.txt" > $3/file2.txt chown $1.$2 $3/file1.txt chown $1.$2 $3/file2.txt chmod 770 $3/file1.txt chmod 770 $3/file2.txt echo "START CLIENT LISTING on $3/file1.txt NOW. You have 5 seconds" sleep 5 chown nobody.nobody $3/file1.txt echo "TRY CLIENT OVERWRITE on $3/file1.txt NOW. You have 5 seconds" sleep 5 ls -la $3 cat $3/file1.txt rm $3/file1.txt rm $3/file2.txt