Skip to content

Instantly share code, notes, and snippets.

@fahadsiddiqui
Last active May 17, 2018 07:32
Show Gist options
  • Select an option

  • Save fahadsiddiqui/c4f40e94c1d3f7d1b517ebda2fb9652c to your computer and use it in GitHub Desktop.

Select an option

Save fahadsiddiqui/c4f40e94c1d3f7d1b517ebda2fb9652c to your computer and use it in GitHub Desktop.
Reset folder and file permissions after copying from old storage.
#!/bin/bash
PATH_TO_RESET=~
# reset folder permissions
find $PATH_TO_RESET -type d -exec chmod 775 {} \;
# reset file permissions
find $PATH_TO_RESET -type f -exec chmod 664 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment