The file "/data/shared/test.json" is not writable

This is probably a super dumb question, but it should be an easy solution and I haven’t been able to find any way to fix it. I’m using N8N in a Docker container. Whenever I try and write a file to the shared folder I get the below error. I created a very basic workflow below but I’m still unable to write any files to the shared folder. The volumes: - ./shared:/data/shared was included in the docker compose file when I created the container.

What is the error message (if any)?

Problem in node ‘Read/Write Files from Disk‘

The file “/data/shared/test.json” is not writable.

Please share your workflow

Share the output returned by the last node

Problem in node ‘Read/Write Files from Disk‘

Information on your n8n setup

  • n8n version: 2.0.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 11

Hi @NewtoN8N

Thank you! Do you know where to find N8N_RESTRICT_FILE_ACCESS_TO so I can update it? Or where to find ~/.n8n-files, I couldn’t find either in the docker compose file?

try add this to your compose in env variables:

N8N_RESTRICT_FILE_ACCESS_TO=/data/shared
3 Likes

Yes, it worked!!!

Hey @NewtoN8N Could you test something for me real quick and check if subdirectories are included in you /data/shared/ directory? So if you try to write something in /data/shared/test/ folder will it work with your current configuration of /data/shared ?

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