Skip to content

Instantly share code, notes, and snippets.

@skounis
Created January 17, 2017 07:49
Show Gist options
  • Save skounis/087debc168a26eb7ddf65b654349aa01 to your computer and use it in GitHub Desktop.
Save skounis/087debc168a26eb7ddf65b654349aa01 to your computer and use it in GitHub Desktop.
Secure .git folder
BASE_PATH=/var/www/html
find $BASE_PATH/. -name ".git" -exec chown root:root -R {} \;
find $BASE_PATH/. -name ".git" -exec chmod a-rxw -R {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment