Skip to content

Instantly share code, notes, and snippets.

@wooki
Created March 20, 2013 12:25
Show Gist options
  • Save wooki/5204277 to your computer and use it in GitHub Desktop.
Save wooki/5204277 to your computer and use it in GitHub Desktop.
Permissions for wordpress
# 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