Here is the first part of my question.

Should I set up two user accounts; one for the database and another for the web server? Or is it better to have one root user for all purposes?


Typically you keep one user per daemon. So, you might have a mysqld user that is severely restricted to just being able to run mysqld, right? Then you add users inside your database using MySQL.

You would also perhaps have a www or apache user that only runs the web server. You then have code which the apache user can read, but it uses a MySQL command to connect to the MySQLd port and authenticate you by using those users you added in the previous step. Does that make sense?

It's your dev environment though...If you don't believe you're a target, well...

  • 1
    dev environments who face the internet are always a target.
    – user151547
    Dec 26 '12 at 16:56
  • I was hoping it was an internal web server.
    – 0x1F602
    Dec 26 '12 at 16:56
  • You can also install the OS's package, so it will setup the users and configuration directories for you and then setup your own binaries with similar permissions. (You may have to disable the distribution's binaries in init scripts.)
    – billc.cn
    Dec 26 '12 at 20:47
  • The problem is just that i do not install packages from repo :). I know that when I install repo package, it creates config and init.d scripts for me, but I am using zipped binaries.
    – madhead
    Dec 26 '12 at 21:17
  • What do you mean "A target"? I was just told to run the code on AWS, because we are moving there. We expect no visitors or dos attacks.
    – madhead
    Dec 26 '12 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.