when i run this command php bin/magento setup:upgrade

/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/BuildAssets/Interceptor.php" file can't be deleted. Warning!unlink(/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/BuildAssets/Interceptor.php): Permission denied The "/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/FixData/Interceptor.php" file can't be deleted. Warning!unlink(/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/FixData/Interceptor.php): Permission denied

  • delete 'generated' folder and try again Commented Jun 15, 2020 at 5:57

3 Answers 3


Please check your permission of "generated" folder first.

set permission from CLI using below command :

sudo chmod -R 777 var/ pub/ generated/

It may help you to resolve issue.


If you are using linux based system than run following command.

sudo chmod -R 777 generated pub var
sudo chown root:root generated

(replace root:root with your system user)

Let me know if further help is required.


if someone is using dockergento go inside a bash with command

dockergento bash --root

and use command mentioned above there.

sudo chmod -R 777 var/ pub/ generated/

Your Answer

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

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