{"repo":"ehmicky/unix-permissions","free":true,"listed":false,"github":"https://github.com/ehmicky/unix-permissions","clone":"git clone https://github.com/ehmicky/unix-permissions.git","description":"Swiss Army knife for Unix permissions","language":"JavaScript","stars":144,"topics":["umask","chmod","access-control","unix","posix","setuid","setgid","permissions","sticky","acl"],"license":"Apache-2.0","category":"cli-tools","readme_excerpt":"Swiss Army knife for Unix permissions. Unix file permissions can take many shapes: symbolic ( ug+rw ), octal ( 660 ) or a list of characters ( drw-rw---- ). This library enables using any of these (instead of being limited to a single one) with any Node.js or CLI command. This library can also perform operations on Unix permissions such as: - testing, setting and unsetting. Using bitwise operations ( , & , ^ , ) can be tedious and error-prone otherwise. - validating syntax. - normalizing. For example u+r,u+w can be shortened to u+rw . - inverting. For example a umask of 117 means new files will be created with 661 permissions. - checking the minimal or maximal permissions among a list of them. This can be useful to aggregate all the permissions of several files, e.g. during a directory recursion. Permissions are manipulated as strings, not as file paths. This means you must use other utilities (such as chmod or stat ) to get and set file permissions using those strings. Examples In JavaScript: On the command line: Install This package works in both Node.js =18.18.0 and browsers. This is an ES module. It must be loaded using an import or import() statement, not require() . If TypeScript is used, it must be configured to output ES modules, not CommonJS. Usage (JavaScript) Several methods other than convert are available but they mostly follow the same pattern. Permission strings are passed as input and returned as output. Usage (CLI) The same methods as in JavaScript are availa","default_branch":null,"files":null,"tree":[],"storefront":"/r/ehmicky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ehmicky/unix-permissions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}