I have been using linux for years, but I need some clarification on what are probably pretty basic principles to how the OS works, but I definitely need clarification due to security concerns.
I am in a situation at work where someone has installed parts of a LAMP stack onto our new CentOS server. They have installed everything using the root user, which if I'm not mistaken, means that all those programs(daemons and the like) will run using the root user account. I have been lead to believe, through my experiences, that doing this is a BAD idea.
I have seen some stuff about creating a user for each process, like having a user for apache, mysql, php. Is this the correct way to go about it? If so, how can I create these users with the permissions they need?
Do I create a user account, then install the software using that user account?
I have looked up these questions individually to try to gain some insight, but I feel as though I'm either missing some pieces, or I have misunderstood something. What is most important to me is that I get this set up securely so we don't end up in a bad situation. I could really use some guidance into this matter. If anybody can provide clarification on the issues I have presented, or have some resources I can go through, that would be amazing.