Error: EACCES, permission denied - when run $ ionic serve


#1

In this tutorial :smile:
http://ionicframework.com/docs/guide/building.html

chp 5, building out your app,

when I run the command $ ionic serve

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


#2

Run ls -l in /Users/marklovett/.config/configstore to check the file ownership.


#3

Is this what you mean Brandy?

I was intending to cd into configstore then run ls -l , however permission was denied.

marklovett$ cd .config/configstore
-bash: cd: .config/configstore: Permission denied


#4

Yes, you need to change the ownership of that directory.

sudo chown -R marklovett .config/

Then try running it and see what you get.


#5

Ok. I changed the ownership, than ran ls -l on the file. Looks like it worked! Now just need to try running ionic serve again and see what happens right?


#6

I ran $ ionic serve again, and this is what I got. I’ve been struggling to get sass compiling.

ionic $ [15:59:04] Using gulpfile ~/Ionic-Projects/todo/gulpfile.js
[15:59:04] Starting ‘sass’…
[15:59:04] Starting ‘watch’…
[15:59:04] Finished ‘watch’ after 6.08 ms

stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: EACCES, open ‘/Users/marklovett/Ionic-Projects/todo/www/css/ionic.app.css’


#7

Seems like we’re making progress though and I appreciate your help very much Brandy. The view seems to be displaying correctly. Now I just need to get Sass configured correctly and I’ll be ready to roll!


#8

After running ls -l on the config file I got this:

marks-mbp:configstore marklovett$ ls -l

total 8
-rw------- 1 marklovett staff 3 Apr 2 22:54 bower-github.yml


#9

Run through some of the solutions in this issue and see if any of them work for you:

Let me know if they don’t.


#10

I guess for the time being I will always run

$ sudo ionic serve

then sass compiles and I dont receive the error.

Thank you Brandy.


#11

A bit late for an answer, but for anyone else having this problem, it seems like a permissions issue. Running brandyshae’s chown example above but on the entire ionic folder worked for me.


#12

Yep your first changed the ownership only for the root directory and not recursive.

I think you have installed ionic-cli with

sudo npm install ionic....

and after that you were running your terminal as root -> everything you have created afterwards like you project have the ownership root.
But you have tried to run and change files as non-root afterwards --> so access denied