Problem in node Read/write files from disk the file is not writable

Describe the problem/error/question

Unable to save to a subfolder in n8n using Read/Write Files from Disk
I have n8n running in docker on a windows based computer.

here is my n8n volumes from my yml file

volumes:
  - D:\Files\sourcecode\n8nv1\n8n_data:/home/node/.n8n 
  - D:\Files\sourcecode\n8nv1\n8n_data\Files:/home/node/.n8n/Files

within docker the Files folder has this “drwxrwxrwx” next to the mode.

i want to save within the Files folder
file.png - Node executed successfully
/home/node/.n8n/Files/file.png - this says is not writable
home/node/.n8n/Files/file.png - The file or directory does not exist
/Files/file.png The file or directory does not exist

What is the error message (if any)?

Problem in node ‘Read/Write Files from Disk‘

The file “/home/node/.n8n/Files/file.png” is not writable.

Please share your workflow

Share the output returned by the last node

Problem in node ‘Read/Write Files from Disk‘

The file “/home/node/.n8n/Files/file.png” is not writable.

Information on your n8n setup

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

Hi, did you try with another directory which is not related with anything previously mounted?

And also, you are not using volumes?

In addition, if you just use “file.png” which executes correctly. where is it actually written? (most likely /home/node)

regards,
J.

Just using the filename will work just fine

Nested Mounts Conflict :

You are mounting both:

  • D:\Files\sourcecode\n8nv1\n8n_data/home/node/.n8n
  • D:\Files\sourcecode\n8nv1\n8n_data\Files/home/node/.n8n/Files

This could cause conflicts, because Docker will mount the first one .n8n and then override its subfolder .n8n/Files with a second mount. Depending on how Docker initializes mounts, the inner mount can shadow the outer one, or vice versa.

I suggest to simply remove the second volume for D:\Files\sourcecode\n8nv1\n8n_data\Files

If the directory do not exists, you can simply create one using the command node.

if i just use the filename it will save in the node folder, but i want it in the Files folder, so i can access it from my local computer and have another automated process within window to do something with it.

It would be much easier if you would create a seperate volume in docker and then mount a local directory on /Files

docker volume create n8n-data or in your case for the yml (

volumes:
  n8n-data:

and mount that -v n8n-data:/home/node/.n8n

and after that mount your local directory (and preferably on a total different path which doesn’t mess up the previous mount -v D:\Files\sourcecode\n8nv1\n8n_data\Files:/Files)

After that you just write to /Files/<filename>

1 Like

changing my yml volume to this allowed me to save to a ‘Files’ Folder,

volumes:
  - D:\Files\sourcecode\n8nv1\n8n_data:/home/node/.n8n 
  - D:\Files\sourcecode\n8nv1\n8n_data\Files:/Files

volumes:
n8n_data:

Hi i would still change your /home/node/.n8n to the n8n_data. normally you don’t have a use to access that data over there. and it will avoid from wrong deletion

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