1

i'm

using magento 2 in local setup in ubuntu 18

when every time i run cmds

php bin/magento s:s:d -f
php bin/magento s:up
php bin/magento s:d:c

the file permission changed how to give proper file permission in ubuntu local setup

i already give permission with

sudo chmod -R 777 /var/wwww/html/myproject/
sudo chmod -R 777 /var/www/html/myproject/pub/

any ideas??

2 Answers 2

0

Magento Devdocs helps with this. Take a look at: https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html I usually run:

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;

find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;

chmod u+x bin/magento
0

Following are the required permissions for magento 2:

sudo find . -type d -exec chmod 755 {} ;

sudo find . -type d -exec chmod 755 {} ;

sudo find ./var -type d -exec chmod 777 {} ;

sudo find ./pub/media -type d -exec chmod 777 {} ;

sudo find ./pub/static -type d -exec chmod 777 {} ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.