Created
August 14, 2018 14:09
-
-
Save SimonJThompson/24f7ba14cf2cf2132cf46acde53fa75d to your computer and use it in GitHub Desktop.
Magento 2 File Permission Reset
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
# Generic file permissions. | |
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
# relax ./var permissions. | |
find ./var -type d -exec chmod 777 {} \; | |
find ./var -type f -exec chmod 777 {} \; | |
# relax ./generated resets. | |
find ./generated -type d -exec chmod 777 {} \; | |
find ./generated -type f -exec chmod 777 {} \; | |
# relax ./pub permissions | |
find ./pub -type f -exec chmod 777 {} \; | |
# tighten config permissions | |
chmod 777 ./app/etc | |
chmod 644 ./app/etc/*.xml | |
# correct ownership | |
chown -R USER:GROUP . | |
# mark bin as executable | |
chmod u+x bin/magento |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment