![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Runs fs commands as the specified user, so files are owned by the correct user.
This is a drop in replacement for the fs or fs-extra module that implements execution based on the userid and groupid.
The API is completely backwards compatible so it can just be used in any project.
Only methods that return JSON primitives are implemented, so fs.readFile for example will not run under a selected user, as this returns a Buffer. Sync methods are not supported either.
For a comprehensive list check the excludes array in lib/index.js.
When calling a filesystem method you can add an object containing the uid and gid of the user you want to execute the method with.
As an example, here it writes a file to the filesystem under the uid and gid of 1000:
fs.writeFile("file.txt", "contents", {uid: 1000, gid: 1000}, callback);
Obviously the user needs write access to the selected folder in this case.
Copyright (c) 2014, Jamy Timmermans me@jamy.be
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
FAQs
Runs fs commands as the specified user, so files are owned by the correct user.
The npm package fs-secure receives a total of 12 weekly downloads. As such, fs-secure popularity was classified as not popular.
We found that fs-secure demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.