Skip to content

Instantly share code, notes, and snippets.

@nathanieltubb
Last active June 22, 2020 18:14
Show Gist options
  • Save nathanieltubb/3bb1fd1fddbf0cff40f2daecb6bc7820 to your computer and use it in GitHub Desktop.
Save nathanieltubb/3bb1fd1fddbf0cff40f2daecb6bc7820 to your computer and use it in GitHub Desktop.
Recursively Change Permissions for File-only or Folders-only

Files-only in Current Directory Down

sudo find . -type f -exec chmod 644 {} \;

Folders-only in Current Directory Down

sudo find . -type d -exec chmod 755 {} \;

Example of Resetting Git-Auto-Deploy .GIT Directory

sudo chown -R git-auto-deploy:git-auto-deploy .git;
sudo find .git -type f -exec chmod 664 {} \;
sudo find .git -type d -exec chmod 775 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment