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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With