Created
March 20, 2013 12:25
-
-
Save wooki/5204277 to your computer and use it in GitHub Desktop.
Permissions for 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
# add your own user to the www-data group | |
sudo adduser yourusername www-data | |
# change ownership to www-data group and your user | |
sudo chown yourusername:www-data -R /var/www/site | |
# change permissions of files and folders | |
cd /var/www/site | |
find . -type d -print0 | xargs -0 chmod 0775 # For directories | |
find . -type f -print0 | xargs -0 chmod 0664 # For files | |
# make all new files inherit the group www-data | |
sudo chmod g+s -R /var/www/site |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment