Skip to content

[BUG] npm resets the SUID bit for a binary in /usr/local/bin #3705

Closed
@bodqhrohro

Description

@bodqhrohro

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have a binary in /usr/local/bin/, which is not related to JavaScript. When I upgrade some package which has a global binary via npm, like typescript or npm itself, the SUID bit on that binary is reset, and I have to set it manually again.

Expected Behavior

npm shouldn't touch foreign files in /usr/local/bin/ at all.

Steps To Reproduce

sudo npm i -g npm

Environment

  • OS: Debian GNU/Linux 12
  • Node: 14.17.6
  • npm: 7.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions