[英]Fork a worker under different user with Node.js cluster module?
It can be done by populating cluster.settings
object with uid
property in master process. 这可以通过在主进程中用
uid
属性填充cluster.settings
对象来完成。 In my case it looks like this: 就我而言,它看起来像这样:
cluster.settings.uid = 10000;
where 10000
is my uid
我的
uid
是10000
To get your uid
on Linux, run: 要在Linux上获取您的
uid
,请运行:
id -u <your-user-name-here>
or simply: 或者简单地:
id -u
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.