系统是Ubuntu 12.04LTS
我在/etc/dev/rules.d/51-android.rules中定义的规则类似于:
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
var mongodb = require('mongodb');
var node_acl = require('acl');
var acl = "";
var app = express();
mongodb.connect('mongodb://127.0.0.1:27017/acl', _mongo_connected);
function _mongo_connected(error, db) {
var mongoBackend = new node_acl.mongodbBackend(db /*, {String} prefix */ );
// Create a new access control list by providing the mongo backend
// Also inject a simple logger to provide meaningful output
acl = new node_acl(mongoBackend);
// Defining roles and routes
set_roles();
}
function set_roles() {
// Define roles, resources and permissions
acl.allow([{
roles: 'admin',
allows: [{
resources: '/secret',
permissions: 'create'
}, {
resources: '/topsecret',
permissions: '*'
}]
}, {
roles: 'user',
allows: [{
resources: '/secret',
permissions: 'get'
}]
}, {
roles: 'guest',
allows: []
}]);
Code continue ...
..
.
..
}
这一切都运作良好,亚行可以看到设备;但是,显然,仅限于我。我希望这个全局规则适用于所有用户(或者#34; plugdev"组中的用户)的全局机器。
在我的情况下,如果我省略OWNER,则设备对ADB不可见。我看到样本甚至省略了组(模式= 0666应该使它全局可用,对吗?),但在我的情况下都不起作用。
我有什么遗失的吗?
感谢。