I am reading this page for changes coming on v2.0 to prepare my environment
For this variable → N8N_RESTRICT_FILE_ACCESS_TO
I think it’s unset currently, but will set to something from 2.0 onward. From document, it’s saying “~/.n8n-files“. But as I understand and also what am I currently using in my docker, the director should be “~/.n8n“, is it a typo or this is for non-docker setup? What will be the actual default setting for 2.0 in docker environment?
I tried 2.0.0 rc3, but could not get write to file to work
I tried to set
N8N_RESTRICT_FILE_ACCESS_TO**=~/.n8n-files
N8N_RESTRICT_FILE_ACCESS_TO=/.n8n-files
N8N_RESTRICT_FILE_ACCESS_TO=**/backups
I’ve run into this issue today as well on Release 2.0.1, installed via npm.
We have several local filesystem scripts down various directories in /opt/scripts/
e.g. /opt/scripts/general, /opt/scripts/app1, /opt/scripts/app2 etc.
Couldn’t get any combination of N8N_RESTRICT_FILE_ACCESS_TO to work allowing access to any file in this directory or any sub directories.
I have found however that if you set it to an empty string (N8N_RESTRICT_FILE_ACCESS_TO=’’) Then it removes the restriction entirely.
Not really a solution but a workaround nonetheless.
I’m experiencing the same issue, specifically that the “Read/Write Files” node results in error that in cannot access folders, even when the folder is explicitly allowed using the N8N_RESTRICT_FILE_ACCESS_TO environment variable. I have seen that multiple folders can be specified using : and have tried listing folders both with and without a trailing / - same result.
I note also that the migration report still warns that the node is incompatible with v2.0 (I am on v1.123.5 currently), even if the environment variable is set as above.
The workaround identified by David_Fitton is working for me, but of course that’s not a long-term solution.
Hello, I know it’s been a few days since this discussion, but I’m using version 2.0.2 via Easypanel and was having the same problem. In fact, I even had problems with “Execute Command” and the Proxy. However, I configured the environment variables below and since then I haven’t had any more problems. “Execute Command” and “Read/Write Files from Disk” now work perfectly.
I had npm version too. I had the same problems, but now I can use the trigger and the execute comands. Maybe you give a try to this format: set “NODES_EXCLUDE=”
great, this was the same problem, neither chatgpt nor Claude could give me a descend answer. After 2 days of troubleshooting I finally came across this thread, changing N8N_RESTRICT_FILE_ACCESS_TO:/home/node/.n8N-files did the trick. if you try and give 2 folder locations than it doesn’t work.
using this on macOS with docker.
now I am going to try and mount a local folder and see if I can get that to work as well