Installation process for Cloud9 packages on AWS


#1

Hi all,

I have trouble lately installing Cloud9 packages for an environment as a test user. Apparently, the installation process needs to chmod to the directory /home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc.

npm ERR! Error: EPERM: operation not permitted, chmod ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’
npm ERR! { [Error: EPERM: operation not permitted, chmod ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’]

I know that whenever you try to create an environment, cloud9 look for node.js in /usr/bin/node. I have /usr/bin/node as a link to /home/ec2-user/.nvm/versions/node/v10.5.0/bin/node. So I give rwx permission for others for everything below v10.5.0.

I do not understand why the installation needs to have permission to change anything in ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’. I thought it would only need executable permission for others for everything under /v10.5.0. I have created an environment before with just executable permission for others in regards to everything under /v10.5.0 directory.

Below is the output of the debug log:
0 info it worked if it ends with ok
1 verbose cli [ ‘/home/ec2-user/.nvm/versions/node/v10.5.0/bin/node’,
1 verbose cli ‘/home/tookdong/.c9/node/bin/npm’,
1 verbose cli ‘config’,
1 verbose cli ‘-g’,
1 verbose cli ‘set’,
1 verbose cli ‘unsafe-perm’,
1 verbose cli ‘true’ ]
2 info using npm@3.10.3
3 info using node@v10.5.0
4 info config set “unsafe-perm” “true”
5 verbose stack Error: EPERM: operation not permitted, chmod ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’
6 verbose cwd /home/tookdong/.c9
7 error Linux 4.14.47-56.37.amzn1.x86_64
8 error argv “/home/ec2-user/.nvm/versions/node/v10.5.0/bin/node” “/home/tookdong/.c9/node/bin/npm” “config” “-g” “set” “unsafe-perm” “true”
9 error node v10.5.0
10 error npm v3.10.3
11 error path /home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc
12 error code EPERM
13 error errno -1
14 error syscall chmod
15 error Error: EPERM: operation not permitted, chmod ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’
15 error { [Error: EPERM: operation not permitted, chmod ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’]
15 error errno: -1,
15 error code: ‘EPERM’,
15 error syscall: ‘chmod’,
15 error path: ‘/home/ec2-user/.nvm/versions/node/v10.5.0/etc/npmrc’ }
16 error Please try running this command again as root/Administrator.
17 verbose exit [ -1, true ]