Permission Denied - Weird Permissions #1

Closed
opened 2018-11-16 22:58:27 +00:00 by josh · 4 comments

curl -fsL bit.ly/node-installer | bash

Preparing to install node.js (minimal) for ubuntu 64
NODE_PATH is not set. Using default install path '/usr/local'
installing node as node v11.2.0...
sudo rsync -Krl /tmp/node-installer.rs3lJtQv/node-v11.2.0-linux-x64/ /usr/local/
rsync: symlink "/usr/local/bin/npm" -> "../lib/node_modules/npm/bin/npm-cli.js" failed: Permission denied (13)
rsync: symlink "/usr/local/bin/npx" -> "../lib/node_modules/npm/bin/npx-cli.js" failed: Permission denied (13)
rsync: recv_generator: mkdir "/usr/local/include/node" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/local/lib/node_modules" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: mkstemp "/usr/local/bin/.node.2WcFpC" failed: Permission denied (13)
rsync: recv_generator: mkdir "/usr/local/share/doc" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/local/share/man/man1" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/local/share/systemtap" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

Solution

sudo chown -R josh:josh /usr/local/lib
sudo chown -R josh:josh /usr/local/share
sudo mkdir /usr/lib/node_modules
sudo chown -R josh:josh /usr/lib/node_modules
`curl -fsL bit.ly/node-installer | bash` ``` Preparing to install node.js (minimal) for ubuntu 64 NODE_PATH is not set. Using default install path '/usr/local' installing node as node v11.2.0... sudo rsync -Krl /tmp/node-installer.rs3lJtQv/node-v11.2.0-linux-x64/ /usr/local/ rsync: symlink "/usr/local/bin/npm" -> "../lib/node_modules/npm/bin/npm-cli.js" failed: Permission denied (13) rsync: symlink "/usr/local/bin/npx" -> "../lib/node_modules/npm/bin/npx-cli.js" failed: Permission denied (13) rsync: recv_generator: mkdir "/usr/local/include/node" failed: Permission denied (13) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/usr/local/lib/node_modules" failed: Permission denied (13) *** Skipping any contents from this failed directory *** rsync: mkstemp "/usr/local/bin/.node.2WcFpC" failed: Permission denied (13) rsync: recv_generator: mkdir "/usr/local/share/doc" failed: Permission denied (13) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/usr/local/share/man/man1" failed: Permission denied (13) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/usr/local/share/systemtap" failed: Permission denied (13) *** Skipping any contents from this failed directory *** rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1] ``` # Solution ``` sudo chown -R josh:josh /usr/local/lib ``` ``` sudo chown -R josh:josh /usr/local/share ``` ``` sudo mkdir /usr/lib/node_modules ``` ``` sudo chown -R josh:josh /usr/lib/node_modules ```
josh closed this issue 2018-11-16 22:58:30 +00:00
josh changed title from Weird Permissions - Solved, filed for reference. to Permission Denied - Weird Permissions - Solved, filed for reference. 2018-11-16 22:58:57 +00:00
Owner

I do want to fix this.

What you you added a check to see if the directory was writable and if the directory isn't writable print an error message about setting NODE_PATH=$HOME/.local/opt/node/lib/node_modules?

Also, I've been working on a better installer: https://git.coolaj86.com/coolaj86/optify.go

I haven't documented it yet (the README is just some thought vomit), but it actually does install node and correctly set PATH correctly.

https://git.coolaj86.com/coolaj86/optify.go/src/branch/master/pkgs/node/install.go

I do want to fix this. What you you added a check to see if the directory was writable and if the directory isn't writable print an error message about setting `NODE_PATH=$HOME/.local/opt/node/lib/node_modules`? Also, I've been working on a better installer: https://git.coolaj86.com/coolaj86/optify.go I haven't documented it yet (the README is just some thought vomit), but it actually does install node and correctly set `PATH` correctly. https://git.coolaj86.com/coolaj86/optify.go/src/branch/master/pkgs/node/install.go
Author

Ok.

Ok.
josh reopened this issue 2018-11-25 04:27:32 +00:00
josh changed title from Permission Denied - Weird Permissions - Solved, filed for reference. to Permission Denied - Weird Permissions 2018-11-25 04:27:41 +00:00
Owner

They were fake errors. I silenced them.

They were fake errors. I silenced them.
Author

That's good.

That's good.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/node-installer.sh#1
No description provided.