I'm looking for the best way to set up Node.js apps within Ubuntu. I have set up /var/node/ to store the various Node apps just like /var/www/ would.
What I am trying to achieve, but seem to be failing:
NodeAdmins (group) has read and write access to /var/node/.
NodeUser (user) has read only access to /var/node/.
NodeUser being the user account that Node apps run under.
This way, FTP users can change any of the files within /var/node/ whilst the Node apps when they're run by NodeUser have access to all the files.
My questions:
1) Is this the correct / safe way?
2) How can I allow more than one group to have different permissions on the folder? I have used chown to set NodeUser as the owner of the group. I don't believe that is the correct way.