-
-
Save alexanderschnitzler/e77dc8723d77d97ca00b to your computer and use it in GitHub Desktop.
This file contains 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 folder in $(find fileadmin typo3conf typo3temp uploads -type d); do chmod 2770 $folder; done; | |
for file in $(find fileadmin typo3conf typo3temp uploads -type f); do chmod 0660 $file; done; | |
# As Markus Blaschke pointed out there is a way better solution to this. Thanks! | |
# https://twitter.com/MarkusBlaschke | |
find fileadmin -type d -print0 | xargs -0 chmod 2770 | |
find fileadmin -type f -print0 | xargs -0 chmod 0660 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ich usually use:
find fileadmin -type d -exec chmod 2770 {} +
find fileadmin -type f -exec chmod 0660 {} +
or, even more universal, but slower:
find fileadmin -type d -exec chmod 2770 {} ;
find fileadmin -type f -exec chmod 0660 {} ;
See some details about pros and cons: http://en.wikipedia.org/wiki/Xargs