Error Warning: file_put_contents(/var/www/html/var/cache//mage-tags/mage---792_CONFIG): failed to open stream: Permission denied

Magento told you that you don't have permissions to write in /var/cache folder, please check what are the permission of the /var folder.

Overview of ownership and permissions Magento 2


I tried with sudo bin/magento setup:di:compile and works fine.


You can try changing all permissions by using the following command

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

I know it's not the prettiest solutions, but it worked for me.

Tags:

Magento2