0

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.

Chirag Parmar
  • 739
  • 8
  • 19
Maruti_magento2
  • 351
  • 3
  • 16

2 Answers2

0

Set permission 777 to your var, generated and pub folder.

chmod -R 777 pub/*;
chmod -R 777 var/*;
chmod -R 777 generated;
S.P
  • 1,534
  • 11
  • 16
0

There is two more thread discussing same question #thread1 #thread2.

First i run permission on the necessary folders. Please visit this link for Magento necessary folder permission

After permission i found that the website is on 2 language English and Spanish.

When i run content deploy code

php bin/magento setup:static-content:deploy -f

It is only write en_EN folder and not write in another folder es_ES. So i got the exact code this to write pub/static folder

php bin/magento setup:static-content:deploy en_US es_ES -f

And i got the solution.

Raghwendra Ojha
  • 115
  • 2
  • 10