Skip to content

Instantly share code, notes, and snippets.

@CodeWire
Forked from chuckreynolds/permissions.sh
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save CodeWire/19e61cb2538ab8498249 to your computer and use it in GitHub Desktop.

Select an option

Save CodeWire/19e61cb2538ab8498249 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