node-red-docker: Error: EACCES: permission denied, copyfile

What are the steps to reproduce? I started node-red in docker with my docker-compose file and my dockerfile

In my Dockerfile i declared that the user node-red should copy the files into the data volume

“USER node-red COPY ./data /data COPY ./data/settings.js /usr/src COPY ./data/flows.json /usr/src”

and in my docker-compose file: volumes: ./data:/data

What happens? I get the following errors when it starts,

`

Error: EACCES: permission denied, copyfile ‘/usr/src/node-red/node_modules/node-red/settings.js’ -> ‘/data/settings.js’ at Object.copyFileSync (fs.js:1728:3) at copyFile (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:68:8) at onFile (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:53:25) at getStats (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:48:44) at startCopy (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:38:10) at handleFilterAndCopy (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:33:10) at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy-sync/copy-sync.js:26:10) at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:125:20) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)

`

What do you expect to happen? My files get copied into the folder data

Please tell us about your environment: OS: Ubuntu

I know there are many issues about this out there but none of them have fixed my problem…

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (10 by maintainers)

Most upvoted comments

Without full access to your environment to have a proper look I can’t say. It looks like you’ve messed up the volume mounts some how.

But if Node-RED is starting correctly and it’s just your sqlite stuff that isn’t working I’m going to close this issue as it’s not a Node-RED problem. You can try asking on the forum to see if anybody can help.