Created
June 10, 2021 15:26
-
-
Save humbertocastelo/ce45c29a9134c46c0ad907f8ff54681f to your computer and use it in GitHub Desktop.
Fix 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
sudo chmod 0755 /var/www | |
sudo chmod 0755 /var/www/html | |
sudo chmod 0640 /var/www/html/wp-config.php | |
sudo chown -R www-data:www-data /var/www/html | |
sudo find /var/www/html -type d -exec chmod 0755 {} \; | |
sudo find /var/www/html -type f -exec chmod 0644 {} \; | |
sudo find /var/www/html/wp-content/plugins -type f -name "*" -not -name "*.o" -exec sh -c ' | |
case "$(head -n 1 "$1")" in | |
?ELF*) exit 0;; | |
MZ*) exit 0;; | |
#!*/ocamlrun*)exit0;; | |
esac | |
exit 1 | |
' sh {} \; -exec chmod 0755 {} \; | |
sudo find /var/www/html/wp-content/themes -type f -name "*" -not -name "*.o" -exec sh -c ' | |
case "$(head -n 1 "$1")" in | |
?ELF*) exit 0;; | |
MZ*) exit 0;; | |
#!*/ocamlrun*)exit0;; | |
esac | |
exit 1 | |
' sh {} \; -exec chmod 0755 {} \; | |
sudo chmod 0640 /var/www/html/wp-config.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment