var fs = require('fs')

var OTHERS = parseInt('0001', 8)
var GROUP = parseInt('0010', 8)
var USER = parseInt('0100', 8)

module.exports = function (path, cb) {
  fs.stat(path, function (er, stats) {
    if (er) return cb(er)
    cb(er,
      stats.mode & OTHERS ||
      (stats.mode & GROUP && process.getgid() === stats.gid) ||
      (stats.mode & USER && process.getuid() === stats.uid)
    )
  })
}

var fs = require('fs')

module.exports = function (path, cb) {
  fs.stat(path, function (er, stats) {
    var mode = stats.mode

    var owner = mode >> 6
    var group = (mode << 3) >> 6
    var others = (mode << 6) >> 6

    if (er) return cb(er)
    cb(er, !!(owner & 1) || !!(group & 1) || !!(others & 1))
  })
}

Change the executable check—hopefully work w/linux
Change the executable check—hopefully work w/linux