Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Node.js 20 on Ubuntu20.04 Installation fail with non-default umask #1795

Open
lucasmo opened this issue Apr 10, 2024 · 0 comments
Open
Assignees
Labels

Comments

@lucasmo
Copy link

lucasmo commented Apr 10, 2024

Describe your bug
The official installer fails if a non-default umask is used.

Distribution Information:

  • OS: Ubuntu
  • Version: focal (20.04)

Node Version:

  • Node: 20

To Reproduce
Steps to reproduce the behavior:

$ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - 
2024-04-10 00:15:47 - Installing pre-requisites
[ ... ]
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[ ... ]
Get:6 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
Err:6 https://deb.nodesource.com/node_20.x nodistro InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2F59B5F99B1BE0B4
Reading package lists...
W: GPG error: https://deb.nodesource.com/node_20.x nodistro InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2F59B5F99B1BE0B4
E: The repository 'https://deb.nodesource.com/node_20.x nodistro InRelease' is not signed.
2024-04-10 00:15:51 - Error: Failed to run 'apt-get update' (Exit Code: 0)

Expected behavior
nodesource apt repo is installed

Additional context
For security purposes, our company requires the default system umask to be 0007.
This means that /usr/share/keyrings/nodesource.gpg has a file mode of 640.

As a workaround not requiring modification of the script, this solves the issue:

(echo '#!/bin/bash'; echo 'umask 0002'; curl -fsSL https://deb.nodesource.com/setup_20.x) | sudo bash -

It would be nicer if the script set the mode of the file or ensured the umask was correct.

@lucasmo lucasmo added the bug label Apr 10, 2024
@lucasmo lucasmo changed the title [ERROR] Node.js 20 on Ubuntu20.04 Installation fail [ERROR] Node.js 20 on Ubuntu20.04 Installation fail with non-default umask Apr 10, 2024
@riosje riosje self-assigned this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants