Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created April 24, 2014 10:46
Show Gist options
  • Save chuckreynolds/11250053 to your computer and use it in GitHub Desktop.
Save chuckreynolds/11250053 to your computer and use it in GitHub Desktop.
permissions.sh shell script for WordPress installs to set file and directory permissions and ownership. Change the path to fit your install. Make sure to 'chmod 700 permissions.sh' before using './permissions.sh' to run it.
#!/bin/bash
find /var/www/public -type d -exec chmod 755 {} +
find /var/www/public -type f -exec chmod 644 {} +
chown -R www-data:www-data /var/www/public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment