5 ms·
Starting as nobody is probably not a good idea if you have more than one service which does that. They'll be able to interact.
by heinrich5991 11y ago
Starting as nobody is probably not a good idea if you have more than one service which does that. They'll be able to interact.
- hoodoof 11y agoCould you please explain in more details the issues here and the right way to do it?
- vacri 11y agoWith two applications running under the same user, if one is compromised, it has ready access to the other. Generally it's fairly easy to make a system user for an application if no special accesses are required - just make a custom system user for the application, and ensure it can access the various things it needs to touch (eg: logging).
- JdeBP 11y ago... and if you want to learn more than has been already said, start with the famous design of qmail as a collection of mutually untrusting daemons that run under individual unprivileged user accounts, precisely to insulate each from the others using the normal operating system mechanisms that insulate one user's processes, files, directories, and so forth from another's. A good question to ask yourself: "Presume that my daemon is compromised by an attacker ... * ... what processes can it trace, debug, read/write the memory spaces and environments of, or send signals to?" * ... what files, devices, and directories can it read and write?" * ... what files, devices, and directories does it own, and can thus grant access to?" Then ask: "How does the answer change if instead of all of my daemons running as the same (even if unprivileged) user they each run as different users, some (where appropriate) having no write access to anything and owning no files nor directories at all?"