Last active
February 28, 2017 01:50
-
-
Save rbk/48e02d7e4d29213ffdf5 to your computer and use it in GitHub Desktop.
Reset Permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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