Change Permissions of Specific File Types

This post was published 10 years, 8 months ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

To change the file permissions for all PHP files to 754:

find . -type f -name '*.php' -exec chmod 754 {} \;

To find all files with permissions 754:

find . -perm -754

To find all files that are not writable by the owner:

find . ! -perm -u+w

Leave a Reply

Your email address will not be published. Required fields are marked *