Script to find/apply Solaris 10 ACL's

This may be a question for a different forum, but as I will need a script I thought I would start here.

We recently migrated from Solaris 8 to Solaris 10. The file system in question here is ZFS, meaning the method for listing and applying ACL's has changed dramatically. To make a long story shorter - does anyone have or know of a script that will traverse a directory structure and collect the ACL's? By ACL's I mean the extended permissions given a file or object - (I include this because in Solaris 10/ZFS all file permissions are considered ACL's whereas with older versions of the OS only permissions granted with 'setfacl' were considered ACL's).

Thanks for any pointers,

Mike

 find /PATH -exec ls -ld {} \; |grep "^..........+"

You can use getfacl to list these files ACL setting.

Not on a ZFS file system - getfact/setfacl have been deprecated... replaced with chmod options for setfacl and ls options (vV) for getfacl.

 
USER=$1
START=$2
ACL_LIST=$3
if [[ ${3} == "" ]]
then
        ACL_LIST=/tmp/acl_list.out
fi

find $START | xargs ls -ld  2>/dev/null |  grep "^..........+" 2>/dev/null > $ACL_LIST
for user in $USER
do
        echo "$user has the following ACL permissions:"
        for DIR in `cat $ACL_LIST | awk '{print $9}' `
        do
                ls -ldV $DIR | grep $user  > /dev/null 2>&1
                RET=$?
        
                if [[ ${RET} -eq 0 ]]
                then
                        echo ""
                        echo $DIR 
                        ls -ldV $DIR | grep $user
                        echo "" 
                fi
        done
done
 

Works for me...