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

insight-bower.yml with EACCESS error by default #1607

Closed
ulpian opened this issue Nov 24, 2014 · 43 comments
Closed

insight-bower.yml with EACCESS error by default #1607

ulpian opened this issue Nov 24, 2014 · 43 comments

Comments

@ulpian
Copy link

ulpian commented Nov 24, 2014

Hey, weird error, I was just doing a fresh install on a server and bower installed fine however when trying to run "bower install" it gave me the EACCESS permission denied error for the ".config/configstore/insight-bower.yml" file.

I never installed bower or npm for that matter via root, this was the first time on this machine that "bower install" was running. When trying to chown the "insight-bower.yml" file it told me it didnt exist, which is true. I resolved it by chown the whole .config folder.

This is with bower v1.3.12. Maybe this is some real bug for bower or just some weird config error on the machine but thought I might flag it up, keep up the good work :)

@sheerun
Copy link
Contributor

sheerun commented Jan 5, 2015

Maybe your HOME wasn't set properly? Can you give a way to reproduce?

@ad3002
Copy link

ad3002 commented Jan 6, 2015

I got similar error today with new installation on Ubuntu with sudo npm install bower -g command, expected config folder was not created in bower installation

Error: EACCES, permission denied '/home/username/.config/configstore/insight-bower.yml'
You don't have access to this file.

    at Object.fs.openSync (evalmachine.<anonymous>:432:18)
    at Object.fs.readFileSync (evalmachine.<anonymous>:286:15)
    at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:34:29)
    at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:27:44)
    at new Insight (/usr/local/lib/node_modules/bower/node_modules/insight/lib/index.js:26:34)
    at ensureInsight (/usr/local/lib/node_modules/bower/lib/util/analytics.js:26:19)
    at Object.setup (/usr/local/lib/node_modules/bower/lib/util/analytics.js:43:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/bin/bower:72:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

@ad3002
Copy link

ad3002 commented Jan 6, 2015

Before I've installed mc and it creates .config folder by root so bower simply doesn't have access to it. Fixed with chown.

@deepakkaithwas
Copy link

I just fixed it in Windows.
I have done three things, which one have fixed it I am not sure.

  1. Run cmd prompt as administrator.
  2. takeown /? this command is equivalent to chown (linux) but for windows.
  3. cacls -cacls /E /T /G :F
  4. simply go in $USER /Users/calvin/.config/configstore/ and make files unhidden.

it worked for me like charm.
I have been trying to fix this since many days.

@VictorBargains
Copy link

I just got a similar issue trying a first time deployment to openshift. pushed repo, ran npm install, then ran bower install. I am guessing this is because root is the owner of the home directory I get dropped in by the rhc ssh command which connects me to the openshift shell. It's trying to mkdirSync ~/.config. Is there a way around this without being able to chown?


bower install

Error: EACCES, permission denied '/var/lib/openshift/54db291bfcf933fd3e000039/.config'
at Object.fs.mkdirSync (fs.js:642:18)
at sync (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/node_modules/mkdirp/index.js:70:13)
at Function.sync (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/node_modules/mkdirp/index.js:76:24)
at Object.create.all.get (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:41:13)
at Object.Configstore (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:27:44)
at new Insight (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/node_modules/insight/lib/index.js:26:34)
at ensureInsight (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/lib/util/analytics.js:26:19)
at Object.setup (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/lib/util/analytics.js:43:9)
at Object. (/var/lib/openshift/54db291bfcf933fd3e000039/app-root/runtime/repo/node_modules/bower/bin/bower:72:11)

at Module._compile (module.js:456:26)

@benhalverson
Copy link

I reinstalled my node setup using this git repo https://github.com/brock/node-reinstall
I was able to install bower -g without sudo. When I run this bash script I am also getting this error.

Error: EACCES, permission denied '/Users/benhalverson/.config/configstore/bower-github.yml'
You don't have access to this file.

at Object.fs.openSync (evalmachine.<anonymous>:439:18)
at Object.fs.readFileSync (evalmachine.<anonymous>:290:15)
at Object.create.all.get (/Users/benhalverson/.nvm/v0.10.38/lib/node_modules/bower/node_modules/configstore/index.js:34:29)
at Object.Configstore (/Users/benhalverson/.nvm/v0.10.38/lib/node_modules/bower/node_modules/configstore/index.js:27:44)
at readCachedConfig (/Users/benhalverson/.nvm/v0.10.38/lib/node_modules/bower/lib/config.js:22:23)
at defaultConfig (/Users/benhalverson/.nvm/v0.10.38/lib/node_modules/bower/lib/config.js:11:24)
at Object.<anonymous> (/Users/benhalverson/.nvm/v0.10.38/lib/node_modules/bower/lib/index.js:40:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

https://github.com/chyld/apollo/blob/master/setup.sh

@skolsuper
Copy link

I am also having this problem. Ubuntu 14.04, almost fresh VPS, cannot get bower to do anything at all. Even bower cache clean throws the same error. Also, I tried deleting bower-github.yml, and now I can't get it back again even after reinstalling bower and then npm+bower. However bower ... still throws permission denied rather than file not found.

@Angel-Gonzalez
Copy link

I had the same error on Elementary Os Freya. I fix it changing ownner in both .config and .cache directories with this command sudo chown -R [user name] ~/.config and sudo chown -R [user name] ~/.cache hope works for others

@skolsuper
Copy link

Thanks Angel-Gonzalez, that worked for me too.

@chasevida
Copy link

@Angel-Gonzalez this resolved it for me too - thanks!

@gougou9903
Copy link

@Angel-Gonzalez this helped me a lot! Thanks!

@jasonmenayan
Copy link

Thank you, @Angel-Gonzalez ! worked for me, too. You're a lifesaver.

@adrianortuzar
Copy link

@Angel-Gonzalez this works in a mac too, thank you.

@martinmoserswiss
Copy link

@Angel-Gonzalez 👍

@felixhao28
Copy link

TY @Angel-Gonzalez

I think this should be written somewhere official.

@kymdusting
Copy link

@Angel-Gonzalez ta, nice one.

@notbrain
Copy link

notbrain commented Jun 1, 2015

This is still an issue, but I found it via a post install step on StriderCD. After installing node via global nvm, same issues on .config and .cache and .local, they aren't even able to be created. Having to manually change permissions on directories that don't exist once the npm install exits non-zero is not ideal. Is there a better way to get around this? How does bower determine to use $HOME/.config et al and should it be using a /usr/local directory when installed globally and/or by root?

http://stackoverflow.com/questions/30582124/stridercd-global-post-install-fails-on-bower-access-to-home-config-home-cach

@pravchuk
Copy link

Thanks Angel-Gonzalez, It worked.

@sudheer594
Copy link

Thanks Angel-Gonzalez, that worked for me too.

@pawat-chom
Copy link

@Angel-Gonzalez this resolved it for me too - thanks!

@alopezo
Copy link

alopezo commented Jun 30, 2015

@Angel-Gonzalez thanks, that was the solution...

@lostclawz
Copy link

Yes! Thank you @Angel-Gonzalez

@puny-d
Copy link

puny-d commented Jul 5, 2015

@Angel-Gonzalez, thanks, help me a lot

@cliffordfajardo
Copy link

Thank you @Angel-Gonzalez

@XXShen
Copy link

XXShen commented Jul 14, 2015

@Angel-Gonzalez ,thanks! It works! ha~ha~ha~

@Muthamizhan
Copy link

@Angel-Gonzalez Thanks for your valuable answer 💯

@EugeneLugin
Copy link

@Angel-Gonzalez Thanks a lot! It works!

@losada24
Copy link

@Angel-Gonzalez it worked for me too. Thanks a lot

@ghost
Copy link

ghost commented Jul 29, 2015

@Angel-Gonzalez solution didn't work for me, but this did:
chmod g+rwx ~/.config/configstore

@vjcoder33
Copy link

@Angel-Gonzalez it worked for me too. Thanks a lot

@scknechaev
Copy link

Guys is you have problem with EACCESS, bower have no permissions to make such operations like removing, adding, rewriting (and other) with files. I fixed it just run this command
sudo bower install --allow-root

@ghost
Copy link

ghost commented Aug 9, 2015

@Angel-Gonzalez thanks !

@meni432
Copy link

meni432 commented Aug 9, 2015

@Angel-Gonzalez Thanks!

@drigoteixeira
Copy link

@Angel-Gonzalez, Your tip was really helpful! Thank you!

@tim545
Copy link

tim545 commented Oct 28, 2015

@Angel-Gonzalez solved! Thanks! I was lost on that one

@ARehmanMahi
Copy link

seriously this was annoying. Thanks @Angel-Gonzalez
please fix this already

@lmorenojr
Copy link

@Angel-Gonzalez thanks that resolved it, appreciate it

@ryananthonydrake
Copy link

Thanks @Angel-Gonzalez Worked for me too!

@thomasrstegelmann
Copy link

@Angel-Gonzalez Thanks a lot!

@bilalcorbacioglu
Copy link

@Angel-Gonzalez Thanks !

@daton89
Copy link

daton89 commented Nov 20, 2015

@Angel-Gonzalez Thanks works on oxs snow too!

@RealWeeks
Copy link

@Angel-Gonzalez Thanks worked Yosemite.

@faceleg
Copy link
Member

faceleg commented Nov 22, 2015

Locking to prevent any more "me too" messages cluttering up the volunteer's review queue.

@faceleg faceleg closed this as completed Nov 22, 2015
@bower bower locked and limited conversation to collaborators Nov 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests