You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chela

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chela

Recursive async chmod and chown.

0.1.0
latest
npmnpm
Version published
Weekly downloads
16
-75.38%
Maintainers
1
Weekly downloads
 
Created
Source

Chela!

Recursive, asynchronous chmod and chown on Node.js, and maybe something else.

Install

npm install chela

Example

var chmod = require('chela').mod;

chmod('/home/tomas/.ssh', '0700', function(err, modified) {
  if (!err) 
    console.log(modified); // prints list of files that were modified
})

var chown = require('chela').own;

chown('/tmp/foobar.txt', 'tomas', 'users', function(err) {
  if (!err)
    console.log('Successfully chowned to tomas:users');
})

When calling chown(), you can also omit the group (third) param, in which case chela will default to either the wheel group (on OS X) or a group matching the username (Linux and others). This is because OS X does not create a group for each username.

Credits

Written by Tomás Pollak.

(c) 2014 Fork Ltd. MIT license.

FAQs

Package last updated on 19 Aug 2020

Did you know?

Socket

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.

Install

Related posts