#!/bin/ksh

if [[ -z $1 ]]; then
	print 'usage: test01 <new directory name>'
else
	echo "Testing ACL 01"
	echo " 1) creating new directory $1 "
	mkdir $1
	echo " 2) setting default ACL on directory $1 "
	setfacl -m d:u::rwx,d:g::rw-,d:o:r--,d:m:rwx $1
	echo " 3) creating new file test01 in directory $1 "
	date > $1/test01	
	echo " 4) setting ACL on $1/test01 "
	setfacl -m u:tester1:r-x $1/test01
	echo " 5) setting ACL on directory $1 "
	setfacl -m u:tester2:r-x $1
	echo " 6) setting ACL on $1/test01 "
	setfacl -m u:tester3:--x $1/test01
fi

