STUCK in COURSE LEVEL 2 - Read/Write node exercise

Describe the problem/error/question

Hello folks, I am stuck on the Binary Exercise 2 from the official n8n course level 2. In this particular step where it says “Write the new binary file data to the machine where n8n is running using the Read/Write Files From Disk node.”, I keep getting this erro “Problem in node ‘Read/Write Files from Disk‘
The file “C:\tmp\poetrydb.json” is not writable.”

What is the error message (if any)?

the error details I see in the output is as follows:

{
“errorMessage”: “The file “C:\tmp\poetrydb.json” is not writable.”,
“errorDetails”: {
“rawErrorMessage”: [
“The file “C:\tmp\poetrydb.json” is not writable.”
]
},
“n8nDetails”: {
“nodeName”: “Read/Write Files from Disk”,
“nodeType”: “n8n-nodes-base.readWriteFile”,
“nodeVersion”: 1.1,
“operation”: “write”,
“itemIndex”: 0,
“time”: “1/31/2026, 11:18:12 PM”,
“n8nVersion”: “2.4.6 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: The file “C:\tmp\poetrydb.json” is not writable.”,
" at ExecuteContext.execute (D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\actions\write.operation.ts:130:10)“,
" at ExecuteContext.execute (D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\ReadWriteFile.node.ts:69:17)”,
" at WorkflowExecute.executeNode (D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1045:8)“,
" at WorkflowExecute.runNode (D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1226:11)”,
" at D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1662:27",
" at D:\n8n\npm_global\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:2297:11"
]
}
}

Please share your workflow


Share the output returned by the last node

The output was:

**The file “C:\tmp\poetrydb.json” is not writable.

The expected the node to maybe download the file on my device if I am not understanding wrong..?**

Information on your n8n setup

  • n8n version: Version 2.4.6

  • Database (default: SQLite): yes ig..

  • n8n EXECUTIONS_PROCESS setting (default: own, main): yes ig

  • Running n8n via (Docker, npm, n8n cloud, desktop app): via npm in Windows Powershell

  • Operating system: Windows 11

  • Extra important info: My n8n, and all its folders are downloaded in an external ssd drive [D drive as seen in my laptop] . I had followed some YT video to help me change some settings to add the ‘path’ in my laptop so npm works to run my n8n by having its folder my my external ssd as my laptop is out of storage mostly. Ig I am having trouble finding the path because of this…**

    Can someone assist pls?? Non techie here** :smiling_face_with_tear:

I also tried various variations of the folder in the external ssd where my n8n folder is…but none worked.

Also I noticed this in the settings section under Migration Report


Yes that 1 workflow is the same one I posted abt…

Under the instance issues I also saw this..

Does this give any clue? :”)
What should I do and how…???:smiling_face_with_tear:
Also, I am on the free community version.

Someone pls teach me in a normie language

There is a new n8n update since 2.0 came out which expanded security, so thats telling you what workflows will have more trouble. maybe its also an issue with how its being put into a tmp folder, which is a temporary folder. I would try a diffrent folder that isnt tmp

you suggested checking something, but I cant find the file :smiling_face_with_tear:

FIGURED IT OUT!!!:tada:

Took some help from ai to discuss how to figure out.

Basically, in mycase, being on windows 11 and using npm in powershell to run n8n, you need to set something called “environment variable” for your n8n instance called “N8N_RESTRICT_FILE_ACCESS_TO”.​

By default it maybe using ~/.n8n folder to read/write anything.​
If you want another folder (in my case, D:/n8n as my d drive is an external ssd drive), you must set N8N_RESTRICT_FILE_ACCESS_TO to that path and then point your file nodes there.

I followed the following process to set an environment variable in my laptop and they restart n8n in a new powershell window.

STEPS:

  1. Pick a base folder, for example:
    D:\n8n (or wherever you wanna read/write save stuff, PREFERABLY whatever parent folder all your files live in (in normal language :smiling_face_with_tear: basically your main n8n folder wherever it is)].
  2. Click on Start, and type “environment variable”
  3. You will a settings option called “Edit the system environment variables”. Click and open that.

  1. Click on “Environment Variables …” at the bottom.

  1. Then, under your user (top list) click “New…” to set a new variable.

  2. Name: N8N_RESTRICT_FILE_ACCESS_TO
    Value: D:\n8n-files (or your chosen path).​

  3. Click OK on all dialogs.

  4. Then close all PowerShell windows and open a fresh one, so it picks up the new env var.

  5. Start n8n from that new PowerShell

    Cheers! The workflow will work now :wink:
    @Lv_1_Course_Complete
    Tips & Tricks Help me Build my Workflow Tutorials > English :united_kingdom: workflow-building

1 Like

I should’ve remembered that! Nice that you solved it!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.