Created
July 4, 2021 19:45
-
-
Save techie2000/609365880ec07c6a3f88aa34fc53cfb3 to your computer and use it in GitHub Desktop.
Setting safe directory/file permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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