2015-09-26 12 views
6

nie mogę uruchomić komendę Bower jako mojego użytkownika, co daje mi poniżej błędu podczas uruchamiania altana:ubuntu, błąd: EACCES, brak dostępu '.../wgląd-bower.json'

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

at Object.fs.openSync (fs.js:432:18) 
at Object.fs.readFileSync (fs.js:286:15) 
at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:27:26) 
at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/index.js:20:44) 
at new Insight (/usr/local/lib/node_modules/bower/node_modules/insight/lib/index.js:37:34) 
at ensureInsight (/usr/local/lib/node_modules/bower/lib/util/analytics.js:25:19) 
at Object.setup (/usr/local/lib/node_modules/bower/lib/util/analytics.js:41: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) 

ale kiedy uruchamiam altankę jako root, działa dobrze.

Co jest nie tak? Działa to dobrze wcześniej, ale ponieważ wykonałem polecenie poniżej, jest źle.

sudo bower cache clean --allow-root 

Odpowiedz

13

Problem był właścicielem pliku. Ponieważ właścicielem pliku "/home/***/.config/configstore/insight-bower.json" był root, po prostu mogę uruchomić altówkę z sudo i --allow-root.

Więc problem łatwo rozwiązać poprzez zmianę właściciela sobie, jak poniżej:

sudo chown bobsilon .config/configstore/insight-bower.json 
Powiązane problemy