Created
October 6, 2017 14:20
-
-
Save faelp22/92b371e33298d23cf90c971097dfdfd4 to your computer and use it in GitHub Desktop.
Aplica permissões de segurança para WordPress
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/bash | |
# | |
# Aplica permissões de segurança para WordPress | |
# | |
# Autor: Isael Sousa <faelp22@gmail.com> | |
# Data: 06/10/2017 as 11:18 | |
# V 1.0 | |
# | |
# | |
echo "Aplicando permissões de arquivos" | |
find . -type f -exec chmod 644 {} \; | |
chmod 404 .htaccess | |
chmod 400 wp-config.php | |
if [ -e "debug.log" ]; then | |
chmod 600 debug.log | |
fi | |
echo "Aplicando permissões de pastas" | |
find . -type d -exec chmod 755 {} \; | |
echo "Removendo arquivos desnecessários" | |
for file in "readme.html" "license.txt" "wp-config-sample.php"; do | |
if [ -e $file ]; then | |
rm $file | |
fi | |
done | |
echo "Finalizado" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment