Problem in node ‘Read/Write Files from Disk1‘: Acces to the file is not allowed

I received an access denied error while reading the .csv file I uploaded to Docker.

Describe the problem/error/question

What is the error message (if any)?

Access to the file is not allowed.

Share the output returned by the last node

{
“errorMessage”: “Access to the file is not allowed.”,
“errorDetails”: {
“rawErrorMessage”: [
“Access to the file is not allowed.”
]
},
“n8nDetails”: {
“nodeName”: “Read/Write Files from Disk1”,
“nodeType”: “n8n-nodes-base.readWriteFile”,
“nodeVersion”: 1,
“operation”: “read”,
“itemIndex”: 0,
“time”: “21.10.2025 16:37:05”,
“n8nVersion”: “1.113.3 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Access to the file is not allowed.”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Files/ReadWriteFile/actions/read.operation.ts:152:10)“,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Files/ReadWriteFile/ReadWriteFile.node.ts:65:17)”,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1265:8)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1446:11)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1847:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2461:11"
]
}
}

Information on your n8n setup

  • n8n version: 1.113.3
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Windows 11 25h2

Try choosing /home/node/.n8n/files/ as the mapping path

I tried to select /home/node/.n8n/files/ as the mapping path, but it still gives the same error.

1 Like

I wonder if the problem could be related to Windows or if we format it, is there a chance it will be fixed?

You can add an Execute Command node with the command pwd to check the working directory, and then use that path for reading/writing files..

I followed what you said step by step but unfortunately the error I received did not change.

Then definitely is a configuration issue with your docker instance.

I have the same issue here. I can successfully run this workflow node in n8n version 1.***. After I updated it to 2.1.0 I have this issue
The file “/Users/arianali/n8ndata/121.png” is not writable.

In your case the issue is probably related to the fact that from n8n 2.0 the environment variable “N8N_RESTRICT_FILE_ACCESS_TO“ is set to “~/.n8n-files“ by default and n8n is not allowed to read from / write into other directories.
Try setting “N8N_RESTRICT_FILE_ACCESS_TO“ to “/Users/arianali/n8ndata“.
If the issue persists you can try setting N8N_RESTRICT_FILE_ACCESS_TO ““ as a workaround, which would make n8n allow to access every directory, so that would be a security risk.

it works, thanks bro.

1 Like