Problem with read/write node after update

Hello everyone and happy season holidays. I recently updated my self-hosted n8n (installed with npm), set as a service through nssm. I tried the read/write node as per the very simple sample here below but I’ve got two types of outcomes:

  1. using \ in the file selector I just got no result,

  2. using / in the file selector I got a “not-allowed” error.

So I adjusted the nssm settings adding a variable that theoretically allowed the access to all my disks (N8N_RESTRICT_FILE_ACCESS_TO=C:\;D:\;E:\;F:\;G:\) but what I get is the usual error message involving all disks: “Access to the file is not allowed. Allowed paths: C:\, D:\, E:\, F:\, G:\”.

What is interesting is that in my PC at the office, where I still didn’t updated, this issue doesn’t occur: I regularly use the / structured path and it works perfectly.

Did you stumble upon this kind of problem? Is it me making something wrong or a problem linked with the new n8n version?

Thank you in advance for advising.

Here’s my very simply workflow

Error’s tack trace

NodeApiError: Access to the file is not allowed. Allowed paths: C:, D:, E:, F:, G: at ExecuteContext.execute (C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\actions\read.operation.ts:152:10) at ExecuteContext.execute (C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-nodes-base\nodes\Files\ReadWriteFile\ReadWriteFile.node.ts:65:17) at WorkflowExecute.executeNode (C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1045:8) at WorkflowExecute.runNode (C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1226:11) at C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1662:27 at C:\Users\User\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:2274:11

My n8n setup:

  • n8n version: 2.0.3
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default, set as service through nssm
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Win11

@AI_Agent2 see below comment

2 Likes
3 Likes

Thanks a lot, Orionpax, this fixed all perfectly!

1 Like

You are welcome @AI_Agent2 kindly mark as the solution.

I really don’t know why there aren’t warnings on n8n after update on this stuff. It would seem like it could use a bit of automation, not sure where it would find it though… to tell people of the issues they may have after update. Like hey you flows that currently use the command node may have issues and will not currently work unless you do the following. Or your read write directory in these active workflows currently have end points this update may break unless you take action to do the following.

Why are people left to update and then have nonworking flow’s… It makes me think Microsoft is programming this stuff.