May 2017
Beginner
552 pages
28h 47m
English
It is possible to match files based on the file permissions. We can list out the files with specified file permissions:
$ find . -type f -perm 644 -print # Print files having permission 644
The -perm option specifies that find should only match files with their permission set to a particular value. Permissions are explained in more detail in the Working with file permissions, ownership, and the sticky bit recipe in Chapter 3, File In, File Out.
As an example usage case, we can consider the case of the Apache web server. The PHP files in the web server require proper permissions to execute. We can find PHP files that don't have proper executing permissions:
$ find . -type f -name "*.php" ...