Directory creation error in ÃÛ¶¹ÊÓÆµ Commerce on Cloud infrastructure
This article addresses the directory cannot be created error in ÃÛ¶¹ÊÓÆµ Commerce on Cloud infrastructure caused by a read-only file system. To fix this, update the .magento.env.yaml
file with the correct language settings for static content deployment, save the changes, and redeploy the instance.
Description description
Environment
ÃÛ¶¹ÊÓÆµ Commerce on Cloud infrastructure
Issue/Symptoms
-
The system logs an error stating it cannot create a directory due to a read-only file system.
-
The error message appears as:
Directory "/app/pub/static/frontend/
<
Namespace>
/<
Theme>
/<
locale>
" cannot be created Warning! mkdir(): Read-only file system -
The system fails to generate static content folders during runtime.
Resolution resolution
To resolve this issue, follow these steps:
-
Open your
.magento.env.yaml
file. -
Check the
SCD_MATRIX
section to confirm that all required languages are listed for each theme. For example:code language-none SCD_MATRIX: Â "Theme_code1": Â Â language: Â Â Â - es_ES Â Â Â - en_US Â "Theme_code2": Â Â language: Â Â Â - es_ES Â Â Â - en_US
-
Add any missing languages to ensure all used languages (such as
en_US
andes_ES
) are included. -
Save the updated
.magento.env.yaml
file. -
Redeploy your ÃÛ¶¹ÊÓÆµ Commerce on Cloud infrastructure instance.