Permission Denied - Weird Permissions #1

Closed
opened 6 years ago by josh · 4 comments
josh commented 6 years ago

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 6 years ago
josh changed title from Weird Permissions - Solved, filed for reference. to Permission Denied - Weird Permissions - Solved, filed for reference. 6 years ago
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
Poster

Ok.

Ok.
josh reopened this issue 5 years ago
josh changed title from Permission Denied - Weird Permissions - Solved, filed for reference. to Permission Denied - Weird Permissions 5 years ago
Owner

They were fake errors. I silenced them.

They were fake errors. I silenced them.
coolaj86 closed this issue 5 years ago
Poster

That's good.

That's good.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.