Skip to content

Instantly share code, notes, and snippets.

@markhalliwell
Created July 21, 2013 16:53
Show Gist options
  • Select an option

  • Save markhalliwell/6049125 to your computer and use it in GitHub Desktop.

Select an option

Save markhalliwell/6049125 to your computer and use it in GitHub Desktop.
Change the ownership settings according to how your www environment is setup.
#!/bin/bash
echo 'Setting ownership to _www:staff ...';
sudo chown -R _www:staff ./;
echo 'Setting directory permissions to 0755 ...';
sudo find . -type d -exec chmod u=rwx,g=rwx,o=rx '{}' \;
echo 'Setting file permissions to 0644 ...';
sudo find . -type f -exec chmod u=rw,g=rw,o=r '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment