cancel
Showing results for 
Search instead for 
Did you mean: 

php magento setup:di:compile Permission issue

php magento setup:di:compile Permission issue

Issue I am having is this

 

When I run php magento setup:di:compile - It will run fine and everything but I then have to manually chmod 777 /var in order for me to run Magento otherwise site wont run

 

Not sure if its a bug or what but I am using Ubuntu and Nginx so not sure why its causing this.

 

Thanks.

2 REPLIES

Re: php magento setup:di:compile Permission issue

Some how its,  related to files and folders permission in Magento /var/generation folder. Its children must be assigned 777 permission, but anytime one folder be created in Magento, it always has 770 permission, this is what the problem is not sure what is causing this if I set manually chmod 777 to var/* then everything is fine

 

Re: php magento setup:di:compile Permission issue

I have the same issue but actually, this is not a bug. After compilation, we have to reset permission for di, generation and cache folder.