Error: EACCES, permission denied

1,848 views
Skip to first unread message

Eric Patton

unread,
Aug 12, 2014, 1:24:30 AM8/12/14
to keyst...@googlegroups.com
I'm trying to install keystone, but when I get to the point where I run the 'yo keystone' command, it goes through all of the initial questions and then throws this error at the end:

/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/node_modules/mkdirp/index.js:89
                    throw err0;
                          ^
Error: EACCES, permission denied '/home/dominion/routes/views'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:679:18)
    at Function.sync (/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/node_modules/mkdirp/index.js:70:13)
    at KeystoneGenerator.routes (/usr/local/lib/node_modules/generator-keystone/app/index.js:321:7)
    at /usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/lib/base.js:387:14
    at processImmediate [as _immediateCallback] (timers.js:374:17)


I've tried changing permissions on a file most people say fixed this issue, but I can't get it to ever get past this point. I've been looking for a solution to this all day and have tried several different things to no avail. Here's the command I mentioned trying:

chown `whoami` /root/.config/configstore/update-notifier-yo.yml

I'm not used to working with Unix, so I'm pretty lost as to what to do with this issue. 

atlb...@gmail.com

unread,
Aug 12, 2014, 2:09:50 AM8/12/14
to keyst...@googlegroups.com
Try one of these SO questions.  You need to work on your permissions for npm.

This link has helped me in the past:

Here is another that you could explore using nvm:

j...@keystonejs.com

unread,
Aug 12, 2014, 8:33:41 AM8/12/14
to keyst...@googlegroups.com
Not sure which OS you're using, but it sounds like you don't have full permissions to the /home/ directory;

You could try this:

sudo chown -R $USER /home


Eric Patton

unread,
Aug 12, 2014, 12:27:15 PM8/12/14
to keyst...@googlegroups.com
I've tried your suggestions, but none of them resolved the issue from either of the SO threads or the chown command you posted.

I'm running Ubuntu version 14.04. I'm also logged in as root. Could that be the issue? Should I try creating a different user and then doing all of this with that user instead? If so, will I need to try to uninstall everything and start from scratch?

atlb...@gmail.com

unread,
Aug 12, 2014, 4:25:27 PM8/12/14
to keyst...@googlegroups.com
For a new user of Unix based OS's my best advice I can give you right now is stop using root.  Even the most careful of people can make big mistakes by running under root.   For operations such as installing software, changing permissions, and other super user tasks you can and should be using sudo:
sudo apt-get install node
sudo chown
-R myuser.myuser /home/myuser


On the last Ubuntu system I installed node on the official repo gave me nodejs instead of node, so I used a different package.  Which software package do you have installed?  I know running under a normal user I had to make some changes to permissions when running under Ubuntu and using apt-get for global npm installs to work without sudo, whereas my Debian machine worked fine, but I also installed from source.

My course of action would be to start from scratch as a new user and reinstall node and npm.  If you have some more patience and want to learn you should be able to work it out without purging node and npm, but you will most likely get running faster with a clean slate.
Reply all
Reply to author
Forward
0 new messages