mkdirp-infer-owner

2.0.0 • Public • Published

mkdirp-infer-owner

mkdirp, but chown to the owner of the containing folder if possible and necessary.

That is, on Windows and when running as non-root, it's exactly the same as mkdirp.

When running as root on non-Windows systems, it uses infer-owner to find the owner of the containing folder, and then chownr to set the ownership of the created folder to that same uid/gid.

This is used by npm to prevent root-owned files and folders from showing up in your home directory (either in node_modules or in the ~/.npm cache) when running as root.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1,335,959
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1,335,959
  • 1.0.2
    15,156
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i mkdirp-infer-owner

Weekly Downloads

1,351,115

Version

2.0.0

License

ISC

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • isaacs