Skip to content

Instantly share code, notes, and snippets.

@MikeNGarrett
Last active July 25, 2025 09:13
Show Gist options
  • Select an option

  • Save MikeNGarrett/f7674d6a01c70ffdbf00 to your computer and use it in GitHub Desktop.

Select an option

Save MikeNGarrett/f7674d6a01c70ffdbf00 to your computer and use it in GitHub Desktop.
Change file permissions to 664, directory permissions to 775
// Run this from the command line.
// h/t: http://superuser.com/questions/91935/how-to-chmod-755-all-directories-but-no-file-recursively#answer-91966
// add read/execute to world, remove write
chmod -R u+rwX,g+rwX,o+rX-w path/
// remove read/write/execute from world
chmod -R u+rwX,g+rwX,o-rwX path/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment