> I have a couple of hundred directories that I would like to setacl.
> Is there a recursive way to change a group of directories, subdirectories,..

I found this shell script somewhere a long time ago..it does what you want
Hope this helps.......
Steve Gilli
-------------------------------------------------------------------------
#!/bin/ksh
function usage {
        echo ""
        echo "Usage: setacl <directory> <acl list>"
        echo "          - recusively sets ACLs on directories"
        echo ""
        echo "Example: setacl mydir system:anyuser rl klif:friends none"
        exit 0
        }

if [ $# -le 1 ] ; then
        echo "setacl : error - too few parameters
        usage
        fi

if [ ! -d $1 ] ; then
        echo "setacl : error - first parameter is not a valid directory"
        usage
        fi

source=$1
shift

echo "Setting ACL on $source to $*"
fs sa -dir $source -acl $*

for dir in `li -Od -Rp $source` ; do
        echo "Setting ACL on $dir to $*"
        fs sa -dir $dir -acl $*
        done

Reply via email to