Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Command-Line Apps
  3. unix-permissions

unix-permissions

Apache-2.0JavaScript6.0.1

A comprehensive JavaScript library for parsing, converting, and manipulating Unix file permissions across multiple notation types.

GitHubGitHub
143 stars5 forks0 contributors

What is unix-permissions?

Unix-permissions is a JavaScript library that provides tools for parsing, converting, and manipulating Unix file permissions across multiple notation types. It solves the problem of working with different permission formats (symbolic, octal, stat) by offering a unified API for conversions and operations like setting, testing, and inverting permissions.

Target Audience

Developers and system administrators working with file systems in Node.js or browser environments, especially those building tools that need to handle Unix permissions programmatically or via CLI.

Value Proposition

It eliminates the tedium and errors of manual bitwise operations or string parsing by providing a comprehensive, type-safe utility that supports all common permission notations and operations in one package.

Overview

Swiss Army knife for Unix permissions

Use Cases

Best For

  • Converting between symbolic, octal, and stat permission notations
  • Programmatically setting or testing file permissions in Node.js scripts
  • Building CLI tools that manipulate Unix permissions
  • Aggregating or comparing permissions across multiple files during directory recursion
  • Handling special permissions like setuid, setgid, and sticky bits
  • Validating and normalizing user-provided permission strings in applications

Not Ideal For

  • Projects exclusively targeting Windows or non-Unix file systems
  • Simple scripts that only use static permissions without conversion or manipulation needs
  • High-performance applications where direct bitwise operations are preferred for minimal overhead
  • Environments stuck on Node.js versions older than 18.18.0

Pros & Cons

Pros

Multi-format Flexibility

Supports symbolic, octal, stat, and object representations, enabling seamless conversion between all common Unix permission notations as demonstrated in the examples and API.

Operation Abstraction

Provides high-level methods for setting, testing, inverting, and comparing permissions, eliminating error-prone bitwise logic detailed in the README's operations section.

Validation and Normalization

Automatically validates permission syntax and normalizes to canonical forms, such as condensing 'u+r,u+w' to 'u+rw', ensuring consistency without manual parsing.

Cross-platform Execution

Runs in Node.js ≥18.18.0 and modern browsers as an ES module, making it versatile for both server-side and client-side use, as highlighted in the install notes.

Cons

Modern Node.js Requirement

Requires Node.js ≥18.18.0, which excludes older projects or environments that haven't upgraded, as explicitly stated in the install section, limiting backward compatibility.

ES Module Only

Must be loaded using import statements, not require(), which can be a hurdle for CommonJS-based projects without migration efforts, adding setup complexity.

No Direct File Interaction

Manipulates permission strings only, requiring additional utilities like fs.chmod or stat to apply permissions to files, as admitted in the README, which adds extra steps to workflows.

Frequently Asked Questions

Quick Stats

Stars143
Forks5
Contributors0
Open Issues0
Last commit9 months ago
CreatedSince 2018

Tags

#unix#acl#cli-tool#devops-tools#posix#nodejs#javascript-library#access-control#sticky#cross-platform#file-system#permissions#es-module#permission-management

Built With

J
JavaScript
E
ES Modules
N
Node.js

Included in

Command-Line Apps19.2k
Auto-fetched 18 hours ago

Related Projects

BatBat

A cat(1) clone with wings.

Stars59,853
Forks1,600
Last commit23 days ago
sccscc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go

Stars8,555
Forks325
Last commit3 days ago
entrentr

Run arbitrary commands when files change

Stars5,637
Forks123
Last commit27 days ago
f2f2

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go!

Stars2,425
Forks65
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub