Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EACCES: permission denied, open '/data/.config.json' #8

Closed
scottsweb opened this issue Sep 12, 2016 · 5 comments
Closed

EACCES: permission denied, open '/data/.config.json' #8

scottsweb opened this issue Sep 12, 2016 · 5 comments
Assignees

Comments

@scottsweb
Copy link

Trying to get node-red up and running on my Raspberry Pi. The docker command I am using is:

docker run -it -p 1880:1880 --restart=always --name="nodered" -v /media/data/node-red/:/data -e FLOWS=flows.json nodered/node-red-docker:rpi

Full log output is:

npm info it worked if it ends with ok
npm info using npm@2.15.1
npm info using node@v4.4.4
npm info prestart node-red-docker@0.14.6
npm info start node-red-docker@0.14.6

> node-red-docker@0.14.6 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"



Welcome to Node-RED
===================

12 Sep 21:00:37 - [info] Node-RED version: v0.14.6
12 Sep 21:00:37 - [info] Node.js  version: v4.4.4
12 Sep 21:00:37 - [info] Linux 4.4.13-v7+ arm LE
12 Sep 21:00:37 - [info] Loading palette nodes
{ [Error: EACCES: permission denied, open '/data/.config.json']
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/data/.config.json' }
12 Sep 21:00:45 - [info] Server now running at http://127.0.0.1:1880/
12 Sep 21:01:59 - [error] Node-RED runtime not started
^C12 Sep 21:02:18 - [info] Stopping flows

/media/data/node-red contains a settings.js file and a flows.json file too, any ideas what might be causing this permissions problem?

@dceejay
Copy link
Member

dceejay commented Sep 17, 2016

do the permissions on the host side allow that docker user access ?

@jthomas
Copy link
Collaborator

jthomas commented Sep 19, 2016

I'm having trouble replicating your user error locally, using the following command.

docker run -it -p 1880:1880 --restart=always --name="nodered" -v /tmp/node-red/:/data -e FLOWS=flows.json nodered/node-red-docker:rpi

My NR instance starts and is usable without seeing the error you encountered above.

Can you try @dceejay's suggestion about checking the user perms?

We have published an update to the Docker images today that means you don't actually need to use volumes to persist user data. There's more details in the updated README.
If you drop the -v /media/data/node-red/:/data parameters I'm assuming it works?

@jthomas jthomas self-assigned this Sep 19, 2016
@scottsweb
Copy link
Author

Thanks for the tips. Removing -v /media/data/node-red/:/data does indeed work.

It turns out that the vfat partition was not writeable by anything other than my user (my user also runs docker). Fixed that (added a umask in /etc/fstab) and Node-RED now starts correctly. Interestingly other container types could write logs etc without issue.

@StuckInLoop
Copy link

StuckInLoop commented Oct 14, 2016

can anyone share an example of the configuration on the umask entry?

@scottsweb
Copy link
Author

@StuckInLoop my /etc/fstab has the following entry:

UUID=XXXX /media/data vfat auto,nofail,noatime,users,rw,uid=pilot,gid=pilot,umask=000 0 0

You will need to add the UUID of your media in place of XXXX

dceejay pushed a commit that referenced this issue Sep 25, 2019
dceejay pushed a commit that referenced this issue Sep 25, 2019
Update node-red to the latest version 🚀
librae8226 pushed a commit to linkgo/node-red-docker that referenced this issue Oct 12, 2019
librae8226 pushed a commit to linkgo/node-red-docker that referenced this issue Oct 12, 2019
…ed-0.20.1

Update node-red to the latest version 🚀
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants