The typical syntax to find files based on their permissions is:
find -perm mode
NOTE: The MODE can be either with numeric or octal permission (like 777, 666.. etc) or symbolic permission (like u=x, a=r+x).
The MODE can be specified in three different ways:
Find Files Based On their Numeric (octal) Permissions
Now let me run the following command:
find -perm 777
NOTE: This command will find the files with permission of exactly 777 in the current directory.
find -perm -766
NOTE: This will find all files where the file owner has read/write/execute permissions, file group members have read/write permissions and everything else has also read/write permission.
find -perm /222
NOTE: This will find files which are writable by somebody (either their owner, or their group, or anybody else).
find -perm /220
NOTE: This will find files which are writable by either their owner or their group.
But if you run the same command with “-” prefix, you will only see the files only which are writable by both owner and group.
find -perm -220
Symbolic notations is used such as u (for user), g (group), o (others).
NOTE:
find -perm -g=w
NOTE: You can use either “=” or “+” for symbolic notation.
For example, the following two commands will do the same thing.
find -perm -g=w find -perm -g+w
find -perm -u=w
find -perm -a=w
find -perm -g+w,u+w
NOTE: The above command is equivalent of find -perm -220 command.
find -perm /u+w,g+w
or,
find -perm /u=w,g=w
NOTE: These two commands do the same job as the find -perm /220 command.
For more details, refer the man pages.
man find