Skip to content

Node 24.0.1 will [ERR_ACCESS_DENIED] with the --permission --allow-fs-write=* on for relative symbolic link target #58286

Open
@jdalton

Description

@jdalton

Version

v24.0.1

Platform

OsX 15.4.1

Subsystem

No response

What steps will reproduce the bug?

Node 24.0.1 will [ERR_ACCESS_DENIED] with the --permission --allow-fs-write=* on for relative symbolic link target.
Related to https://github.com/nodejs/node/blob/v24.0.1/lib/fs.js#L1783-L1795

Noticed this trying to run in a subprocess using the execPath to call out to the npx bin js file for the equiv ofnpx cowsay
From https://github.com/npm/bin-links/blob/v5.0.0/lib/link-gently.js#L81-L83

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior? Why is that the expected behavior?

To allow the path since it's in the allowed * pattern,

What do you see instead?

Running [email protected]
Error [ERR_ACCESS_DENIED]: relative symbolic link target
at symlink (node:internal/fs/promises:995:13)
at /Users//.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/bin-links/lib/link-gently.js:81:14
at async Promise.all (index 1)
at async Promise.all (index 0)
at async #createBinLinks (/Users/the_user/.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:396:5)
at async Promise.allSettled (index 0)
at async #linkAllBins (/Users/the_user/.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:377:5)
at async #build (/Users/the_user/.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:162:7)
at async Arborist.rebuild (/Users/the_user/.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:62:5)
at async [reifyPackages] (/Users/the_user/.nvm/versions/node/v24.0.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:336:11)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.permissionIssues and PRs related to the Permission Model

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions