Skip to content

Instantly share code, notes, and snippets.

@techie2000
Created July 4, 2021 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techie2000/609365880ec07c6a3f88aa34fc53cfb3 to your computer and use it in GitHub Desktop.
Save techie2000/609365880ec07c6a3f88aa34fc53cfb3 to your computer and use it in GitHub Desktop.
Setting safe directory/file permissions
# for directories: rwxr_xr_x
find . -type d -exec chmod 755 {} \;
# for files : rw_r__r__
find . -type f -exec chmod 644 {} \;
# or wrap it in one command
find YOUR_CATALOG -type f -exec chmod 644 {} + -o -type d -exec chmod 775 {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment