Last active
May 29, 2019 14:55
-
-
Save StenHigh/2cf07f8f8797d6569968c5d68721a5b5 to your computer and use it in GitHub Desktop.
permission dir and files for magento 2
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
#!/usr/bin/env bash | |
echo 'start'; | |
echo 'chmod 644'; | |
find . -type f -exec chmod 644 {} \; | |
echo 'chmod 755'; | |
find . -type d -exec chmod 755 {} \; | |
echo 'var chmod 777'; | |
find ./var -type d -exec chmod 777 {} \; | |
echo 'media chmod 777'; | |
find ./pub/media -type d -exec chmod 777 {} \; | |
echo 'static chmod 777'; | |
find ./pub/static -type d -exec chmod 777 {} \; | |
echo 'chmod etc 777'; | |
chmod 777 ./app/etc | |
echo 'etc/*.xml chmod 644'; | |
chmod 644 ./app/etc/*.xml | |
echo '-R :www-data'; | |
chown -R :www-data . | |
echo 'chmod u+x bin/magento'; | |
chmod u+x bin/magento | |
echo 'finish'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment