Gulp!?!? Error: EACCES?!?!? Why won’t NPM work in this directory?

Tried to run Gulp from an external drive. Actually running locally on a Volume mounted from our QNAP NAS storage system.

Errors! Moved it to the main drive. Still errors:

$ gulp
[11:31:09] Using gulpfile ~/Documents/you-are-here/gulpfile.js
[11:31:09] Starting 'clean'...
[11:31:09] 'clean' errored after 11 ms
[11:31:09] Error: EACCES, rmdir '/Users/mikekilmer/Documents/hhharmony/dist/images'
at Error (native)

People are saying to run this:

npm cache clean

and this

sudo chown -R $USER:$GROUP ~/.npm 

I don’t even see ~/.npm. Created it. Ran above. No luck.

What are these plus signs at the end of my file permissions?!

drwxr-xr-x+  3 mikekilmer  staff   102B Aug  6  2015 lang/

Access Control Lists.

Which you can view by adding the e flag to your list command:

ls -ale
-rw-r--r--   1 mikekilmer  staff   578B Oct 22  2015 index.php
drwxr-xr-x+  3 mikekilmer  staff   102B Aug  6  2015 lang/
 0: group:everyone inherited deny add_file,add_subdirectory,directory_inherit
drwxr-xr-x+ 10 mikekilmer  staff   340B Sep 23  2015 lib/

Let’s remove those ACLs (for now anyway)!

chmod -RN /path/to/directory

Make that: sudo chmod -R .

Same error. Right! I had tried to run Gulp as root when still in the NAS volume. Might have messed up permissions? I can run sudo gulp, but it’s not making new files.

sudo chown -R !(whoami) .
gulp

Runs now…

Wait – I was looking in assets/styles for a new main.css file! It’s in dist/styles.

Anyway – a reminder that ACLs exist.