Skip to content

Instantly share code, notes, and snippets.

@rbk
Last active February 28, 2017 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbk/48e02d7e4d29213ffdf5 to your computer and use it in GitHub Desktop.
Save rbk/48e02d7e4d29213ffdf5 to your computer and use it in GitHub Desktop.
Reset Permissions
function reset_permissions() {
echo 'who should own the directory tree?';
read owner;
sudo chown -R $owner:$owner $1;
sudo find $1 -type d -exec chmod 755 {} \;
sudo find $1 -type f -exec chmod 644 {} \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment