keystone-classic: Error: EACCES, permission denied '/root/.config/configstore/insight-yo.json'

On Fedora 24 i get:

$yo keystone

Error: EACCES, permission denied ‘/root/.config/configstore/insight-yo.json’ You don’t have access to this file.

at Object.fs.openSync (fs.js:439:18)
at Object.fs.readFileSync (fs.js:290:15)
at Object.create.all.get (/usr/lib/node_modules/yo/node_modules/configstore/index.js:27:26)
at Object.Configstore (/usr/lib/node_modules/yo/node_modules/configstore/index.js:20:44)
at new Insight (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:37:34)
at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:130:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 37 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed this with: chmod g+rwx /root /root/.config /root/.config/configstore

In order to make this working in a Docker Alpine Linux container, you need to

  mkdir -p /root/.config/configstore
  chmod g+rwx /root /root/.config /root/.config/configstore

same problem in docker container

(on CentOS 6.9) Even if I change permissions on /root/.config/configstore/insight-yo.json, when I use yo loopback:model these permissions are overwritten and the error comes back…

Yeoman’s CLI tool is highly opinionated and does not document that it uses https://www.npmjs.com/package/root-check to prevent being run by the root user.

I have the same problem.Everytime I use yoman command,such as yo -v,the /root/.config/configstore/insight-yo.json file will be created ,and the auth is -rw-------.So it’s useless to change the auth.I also tried to change the umask,but it didn’t work.By the way,I use Ubuntu 16.04 LST.

Those who encouter this issue, if you have a desktop environment on your linux :

  • Open the direction ‘/root/.config/configstore’ as a root
  • Right click ‘insight-yo.json’ file -> Properties
  • In ‘permissions’ tab, change every ‘Access’ methods to ‘Read and Write’

For anyone stumbling across this via Google… this is what I had to do in order to get Yeoman working in Docker + Alpine:

ARG TAG=14-alpine

FROM node:$TAG

WORKDIR /app

# Install packages
RUN set -eux; \
    npm install -g yo \
    && \
    mkdir -p /root/.config/configstore \
    && \
    mkdir -p /root/.config/insight-nodejs \
    && \
    chmod -R g+rwx /root /root/.config

CMD ["yo"]

Git repo: https://github.com/nystudio107/docker-yeoman

Docker images: https://hub.docker.com/repository/docker/nystudio107/node-yeoman

Shell alias:

alias yo='docker run --rm -it -v `pwd`:/app nystudio107/node-yeoman:16-alpine '

same problem in Debian 8 i did.

mkdir -p /root/.config/configstore chmod g+rwx /root /root/.config /root/.config/configstore

In fact, ‘/root/.config/configstore/insight-yo.json’ doesn’t exist.

same problem:(

I had the same issue here is the solution for it - here it is 😃 https://gist.github.com/Jay991/4275c5e5f11741a7f9b3743da3110976

had the same issue. $ sudo chmod 777 /home/{yourUserName}/.config/configstore/ /home/{yourUserName}/ .config/configstore/insight-yo.json - solved problem.

same propblem on ubuntu. I used sudo everywhere

you can use this ~$ sudo chmod 777 -R ~/.config/configstore

I had the same issue inside my docker container. I solved it by setting XDG_CONFIG_HOME variable of the configstore package to a config path inside my app directory. eg export XDG_CONFIG_HOME=/home/code/app/yo_config/ or inside the Dockerfile ENV XDG_CONFIG_HOME=/home/code/app/yo_config/

Where /home/code is the WORKDIR in my docker image.

I Solve it by changeing the owner fom root to my username sudo chown -R me:me /home/me/.config/configstore/ change me with your username and group .

Hi All,

I had the same issue. Using root, I tried to change the permissions of the insight-yo.json file as mentioned above but observed that whenever I ran the “yo hubot”, it again the replace the file permissions to 300.

Finally as mentioned by Jay991, I tried to run the same command by a user with sudo privileges but without the sudo command & it was successful.

When I ran “sudo yo hubot”, it threw the same error. But when I ran the “yo hubot” directly, it worked properly.

mlb - this has fixed it for me. i was running with su.