Directory creation error in Adobe Commerce on Cloud infrastructure
This article addresses the directory cannot be created error in Adobe 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
Adobe 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 Adobe Commerce on Cloud infrastructure instance.