Reputation: 1518
I have seen npm adduser
, but i can figure it out how to manage this inside mine code.
What i have to do is to create new user from nodejs server code inside linux server, and change chmod and chown of that user and folders it content.
Upvotes: 3
Views: 3298
Reputation: 68
Use child_process.execFile to execute /usr/sbin/adduser
, /bin/chmod
and /bin/chown
Otherwise you can use exec from npm if your version of nodejs doesn't have child_process.execFile
Upvotes: 1