Created
April 20, 2018 01:44
-
-
Save saxenap/bd5441fa0aa9b49c584ac19ba5987fa1 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 | |
getent group www || groupadd www | |
usermod -a -G www apache | |
usermod -a -G www ec2-user | |
chgrp -R www /var/www | |
chown -R root:www /var/www | |
find /var/www -type d -exec sudo chmod 2775 {} + | |
find /var/www -type f -exec sudo chmod 0664 {} + | |
echo " /var/www folder permissions modified." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rm -rf public_folder_permissions && wget -O public_folder_permissions https://gist.githubusercontent.com/saxenap/bd5441fa0aa9b49c584ac19ba5987fa1/raw && chmod 777 public_folder_permissions && ./public_folder_permissions