Created
September 28, 2016 21:48
-
-
Save murilopontes/441ff6fcb1a4c5bdc10c073405c5859a to your computer and use it in GitHub Desktop.
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 | |
cd /home | |
chmod 711 * | |
for x in *; do | |
echo "fix /home/$x" | |
groupadd $x &> /dev/null | |
chown -R $x:$x $x &> /dev/null | |
chown -R $x:www-data $x/public_html &> /dev/null | |
chmod -R u+rwX $x &> /dev/null | |
chmod -R g-rwx $x | |
chmod -R o-rwx $x | |
chmod -R g+rwX $x/public_html &> /dev/null | |
done | |
chmod 711 * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment