Last Updated: February 25, 2016
·
1.322K
· apug

Use find to change permissions to some files

You ca use find command with -exec option to change permissions to some files.
Here some examples:

Use

find . -type d -exec chmod a+rx {} \;

to add read (list) and access permission to current directory and all subdirectories,

find . -name "*.php" -exec chmod a+x {} \;

to add execution permission to all php files.

1 Response
Add your response

Awesome tip, you have no idea how long I look at my server for wondering how to make my life more simple, and that is defiantly something that I will be bookmarking. Thanks!

over 1 year ago ·