Created
January 18, 2015 20:41
-
-
Save joeyhipolito/7e9c03313a23d9049e28 to your computer and use it in GitHub Desktop.
Fixing permissions in /var/www or /usr/share/nginx/www
This file contains hidden or 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
Repeatedly, you'll be fixing permissions, ownership in these directories `/var/www` or `/usr/share/nginx/www` whenever you are deploying your websites. | |
Here are the commands to save you some time | |
**apache** | |
sudo add-user $(whoami) www-data && \ | |
sudo chown -R www-data:www-data /var/www && \ | |
sudo chmod -R g+rw /var/www; find /var/www -type d -print0 | sudo xargs -0 chmod g+s | |
**nginx** | |
sudo add-user $(whoami) www-data && \ | |
sudo chown -R www-data:www-data /usr/share/nginx/www && \ | |
sudo chmod -R g+rw /usr/share/nginx/www; find /usr/share/nginx/www -type d -print0 | sudo xargs -0 chmod g+s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment