Skip to content

Instantly share code, notes, and snippets.

@thebouv
Created February 19, 2015 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebouv/d6d4a9f651c0d561f3a4 to your computer and use it in GitHub Desktop.
Save thebouv/d6d4a9f651c0d561f3a4 to your computer and use it in GitHub Desktop.
Recursive find and change permissions
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