A
A
ayapergenov2015-05-29 14:14:34
linux
ayapergenov, 2015-05-29 14:14:34

How to set permissions in linux ubuntu so as not to take a steam bath?

From time to time I encounter troubles when installing packages in ubuntu. Some part is solved by using sudo su and some part is not given up.
Once again I decided to launch a BEM project. Registered in the console yo bem-stub as root.
As a result, I have Error: EACCES, permission denied '/root/.config/configstore/insight-yo.yml'
You don't have access to this file.
ce55fb57e9e84ec4b960b196a40f46e1.png
Prompt links where to esteem about adjustment of the rights
Or on each folder to expose the rights manually?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2015-05-29
@ayapergenov

You did sudo su, which logged you in as root, whose home directory is /root/. Next, you apparently did npm install yo, which installed yo locally as root.
I do it all the time sudo командаand have no problems. I don't remember the last time I had to log in as root.

I
i, 2015-05-30
@ilyarsoftware

I recommend setting up npm for the current user and not using sudo :

echo "prefix=~/.local" > ~/.npmrc
echo "export NODE_PATH=\$NODE_PATH:~/.local/lib/node_modules" >>  ~/.bashrc
echo "export PATH=~/.local/bin:\$PATH" >>  ~/.bashrc
echo "export PATH=./node_modules/.bin:\$PATH" >>  ~/.bashrc
source ~/.bashrc

After that, you need to reinstall all global packages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question