Problem in node ‘Read/Write Files from Disk‘

Describe the problem/error/question

i have a problem in using the node 'Read/write Files from disk

Share the output returned by the last node

The file was created but its identity does not match and cannot be written.///
{
“errorMessage”: “The file was created but its identity does not match and cannot be written.”,
“errorDetails”: {
“rawErrorMessage”: [
“The file was created but its identity does not match and cannot be written.”
]
},
“n8nDetails”: {
“nodeName”: “Read/Write Files from Disk”,
“nodeType”: “n8n-nodes-base.readWriteFile”,
“nodeVersion”: 1.1,
“operation”: “write”,
“itemIndex”: 0,
“time”: “2/10/2026, 6:36:49 PM”,
“n8nVersion”: “2.6.3 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: The file was created but its identity does not match and cannot be written.”,
" at ExecuteContext.execute (C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\actions\write.operation.ts:130:10)“,
" at ExecuteContext.execute (C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\ReadWriteFile.node.ts:69:17)”,
" at WorkflowExecute.executeNode (C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1069:8)“,
" at WorkflowExecute.runNode (C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1250:11)”,
" at C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1685:27",
" at C:\Users\hichr\AppData\Local\nvm\v22.12.0\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:2328:11"
]
}
}

version: 2.6.3
running n8n via npm on windows 11

Hello @Anouar_Hichri,

This issue has been discussed recently, and it appears to be a known problem with n8n installed via npm on Windows 11,

You can find more details here:

For now, the safest approach is to install and run n8n using Docker.

Hi @Anouar_Hichri Welcome!
I think you are trying to write a file into a N8N_RESTRICT_FILE_ACCESS_TO, please consider reading this:

And @mohamed3nan said this is a known issue so reading the conversation provided by him might help.

Thank you @mohamed3nan

1 Like

@Anshul_Namdev i have tried several solutions but none of them worked anyways thanks for replying guys

1 Like

Hi @Anouar_Hichri,

I had the same issue.

On Windows, the .env file is not always correctly loaded, and N8N_RESTRICT_FILE_ACCESS_TO may not be detected even if other variables are working.

As a temporary workaround, running n8n with Docker solved the problem for me. Environment variables were then correctly applied.

Hope this helps.

3 Likes

@Touk Thank you i will use Docker instead

1 Like

@Touk hey brother i tried docker instead but it still the same issue can you tell me how you solved the problem?