emerleite/node-gravatar

Permissions

robjens opened this issue · 4 comments

I seem to have a permissions issue that always originates from this projects cli.js file. Any chance you can shed light on this?

user@support ~bb (git)-[develop] % npm i                                                                                                                                                      :(
npm ERR! Linux 4.2.5-1-ARCH
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
npm ERR! path /srv/http/domain/example.com/social/node_modules/gravatar/cli.js
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall chmod

npm ERR! Error: EPERM: operation not permitted, chmod '/srv/http/domain/example.com/social/node_modules/gravatar/cli.js'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, chmod '/srv/http/domain/example.com/social/node_modules/gravatar/cli.js']
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'chmod',
npm ERR!   path: '/srv/http/domain/example.com/social/node_modules/gravatar/cli.js' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /srv/http/domain/example.com/social/npm-debug.log

This is while I have group membership of http which has full g+w permissions on all folders. What would be something likely to cause this? Regeneration?

Btw, annoyed Node still advices one to run as root... shoot me ><

Humm. Not sure. Need to investigate. Thanks for the report

Not sure. Need to investigate. Thanks for the report

I noticed our other project does this too, here it was with gulp. Somehow npm / templates ignore group write bit with ACL on our Arch box. I guess I could do a setfacl to ensure when creating files it writes using the 'other' (www-data/http) group because it is that this folder is run both by a systemd service a nginx upstream under http and sometimes, I need to run it from my (sop) user.

It really shouldn't matter imho... but this might be just a npm thing.

Ah. I read npm changes ownership. Ugh. I guess this can be closed, thanks for the prompt reply though 👍