Last active
April 5, 2018 18:04
-
-
Save xorenio/97d1f6f6511c2a50100c to your computer and use it in GitHub Desktop.
Fixing all the file perm on a website
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
#!/bin/sh | |
echo "Fixing perissions for files and folders." | |
find . -type f -name '*.php' -exec chmod 600 {} \; | |
find . -type f -name '*.html' -exec chmod 644 {} \; | |
find . -type f -name '*.htm' -exec chmod 644 {} \; | |
find . -type f -name '*.xml' -exec chmod 600 {} \; | |
find . -type f -name '*.css' -exec chmod 755 {} \; | |
find . -type f -name '*.less' -exec chmod 644 {} \; | |
find . -type f -name '*.js' -exec chmod 644 {} \; | |
find . -type f -name '*.png' -exec chmod 644 {} \; | |
find . -type f -name '*.jpg' -exec chmod 644 {} \; | |
find . -type f -name '*.txt' -exec chmod 644 {} \; | |
find . -type f -name '*.conf' -exec chmod 600 {} \; | |
find . -type f -name '*.txt' -exec chmod 644 {} \; | |
find . -type f -name '*.yml' -exec chmod 600 {} \; | |
find . -type f -name '*.less' -exec chmod 600 {} \; | |
find . -type d -exec chmod 755 {} \; | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment