Created
February 19, 2015 15:40
-
-
Save thebouv/d6d4a9f651c0d561f3a4 to your computer and use it in GitHub Desktop.
Recursive find and change permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -perm 777 -exec chmod 755 {} \; # (for changing the directory permission) | |
find . -type f -perm 777 -exec chmod 644 {} \; # (for changing the file permission) | |
# If they did not have 777 permissions, we easily remove the -perm 777 part. | |
# sourced from: http://serverfault.com/a/363428 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment