Showing results for 
Search instead for 
Did you mean: 

Cannot write to the "" file

Cannot write to the "" file

Hi community, 


I'm new to Magento and the company which runs a website in Magento version 4.2.0. 

A couple times a week, since a few weeks, we have the problem that articles on the website are no longer available and that the following error appears;


1 exception(s):

Exception #0 (Magento\Framework\Exception\FileSystemException): Cannot write to the "/..." file. Unable to write.


Also it's not possible at that moment to login into the Magento portal.

The only thing we can do is connect to the database via Putty and change some write permissions so that everything works again. 

These are the Putty instructions that I received from our previous site admin;


rm -rf /data/html/isolatieactie/pub/static*

cd /data/html/isolatieactie

php bin/magento cache:clean

php bin/magento cache:flush

sudo rm -rf var/cache/* var/page_cache/* generated/code/*

sudo rm -rf var/cache/* var/di/* var/generation/*

sudo php bin/magento setup:di:compile

bin/magento setup:static-content:deploy nl_NL nl_BE en_US fr_BE -f

sudo chmod -R -v 777 /data/html/isolatieactie/var/cache/

sudo chmod -R -v 777 /data/html/isolatieactie/var/page_cache/

sudo chmod -R -v 777 /data/html/isolatieactie/pub/static/

sudo chmod -R -v 777 /data/html/isolatieactie/var/view_preprocessed/pub/static/


My question; why doe we have this "Write permission" error that paralyzes our entire site? this Putty solution is just a workaround. I tried the search in the community but did not find anything related to this.


Thank you.