cancel
Showing results for 
Search instead for 
Did you mean: 

find files with ACL entries

SOLVED
Go to solution
Rainer von Bongartz
Honored Contributor

find files with ACL entries

I want to find all files in a certain directory that contain ACL entries refering to a user not longer in /etc/passwd

getcl on such a file returns a pattern
default:user:5053:rwx
but the find command
find . -acl '5053.*' -print
does not return anything



He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
4 REPLIES
Hakki Aydin Ucar
Honored Contributor

Re: find files with ACL entries

lsacl /your_directory

does not return what you want ?
Rainer von Bongartz
Honored Contributor

Re: find files with ACL entries

The files are somewhere in the directory tree underneath the current directory,so only a find command will help
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Jim Walls
Trusted Contributor

Re: find files with ACL entries


Try this:

find . -type d -exec lsacl {} \;

sujit kumar singh
Honored Contributor
Solution

Re: find files with ACL entries



hi Rainer,

you can try this if the FS is VXFS

# find / -xdev -depth -type f -aclv "user:*:???" -exec getacl {} \+
# file: /test
# owner: root
# group: sys
user::rw-
user:sujisin:rwx
group::r--
class:rwx
other:r--

# file: /test22
# owner: root
# group: sys
user::rw-
user:sujisin:r--
group::r--
class:r--
other:r--
#