Skip to main content

Getting permission issue for vendor mage folder while update anything on admin

I am using magento 2.3.2 community edition. While update any setting at backend I am getting error like

Warning: file_put_contents(/var/www/html/ihouzit/var/cache//mage-tags/mage---39a_MAGE): failed to open stream: Permission denied in /var/www/html/ihouzit/vendor/colinmollenhour/cache-backend-file/File.php on line 691

Sometimes to mage MysqlPDO file. Why this happens lot of times. Always I run permission command, then it comes in normal. Any fix solution for this issue?

Same error for bellow file also

var/cache//mage-tags/mage---39a_DB_PDO_MYSQL_DDL): failed to open stream

Thanks in advance.