Created
January 21, 2017 21:55
-
-
Save turkeryildirim/5b6911d160c2a9afd390bf20165fcaf7 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 | |
for i in $(ls -d /home/*); do | |
user=${i/\/home\/} | |
echo $user | |
chmod 750 /home/$user/public_html | |
find /home/$user/public_html/. -type f -exec chmod 640 {} \; | |
find /home/$user/public_html/. -type d -exec chmod 750 {} \; | |
chown $user:$user /home/$user/public_html | |
chown -R $user:$user /home/$user/public_html/* | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment