Error: EACCES: permission denied, open 'test.json'
So, this is the message returned by “Write Binary File” node.
I followed the Server Setup, I am using docker compose just for up n8n (the postgres is on separated server) so, the lines are:
Yes, I created a user called “node” and it is the owner of “/home/node/n8n-local-files”. This user is also member of docker group so, I run docker-compose without sudo.
What I am doing wrong?
Hey @powerPT, I am sorry to hear you’re having trouble here.
I’ve just set up a fresh Ubuntu server, installed docker & compose and then configured n8n in the way you have described. I didn’t run into any trouble with writing a file in the /files folder though:
So to make sure I am not missing anything here, maybe you can share some additional details?
Are you running docker with your host node user? Which permissions does the /home/node/n8n-local-files directory on your host (/files in your container) have? And does a file (possibly with more restrictive) permissions possibly exist already in your folder?
Oh, now it is working. The folder permissions wasn’t 777.
So, now I am running n8n as root, the folder is inside /root/n8n-local-files and with 755 I am not be able to write, now with 777 it can!
n8n is running weird
I had the same problem. The thing is in my VPS the 1000 uid gid is assigned to mysql user. The directories i created with root user didn’t let n8n write files there. You have to chown the folders to that of user 1000.
I had also open a topic but nothing happened. I think in the future they must provide an option to select the uid and gid in docker like many other projects do.