I just got a VPS sver the other day, I'm new to server administration, but not that new to Ubuntu (11.04). I use it in my living room as the HTPC, and I had a previous VPS that I used on and off for a team speak server. This one I'm setting up for long term use. So I would like to know the best practice when it comes to websites and tasks that I have the server proforming. I understand that it could be beneficial to separate each website into it's own usergroup or under its own username. I would setup nginx so that it could read all of the users directors (and thus each website) but could not touch anything else. The same with the TeamSpeak, should I make a user for TeamSpeak so that it operates within its own confined area or is this overkill?

I do have access to root on the sever and my current plan is to run about 4 websites and a TeamSpeak server. My stack is Linux (Ubuntu 11.04 LTS), nginx, and PHP 5.4.3 (using the PDO SQLite 3 built in driver for the database). Should PHP have it's own user group or is it ok to place it in with nginx?


Best practices for services like teamspeak are to run them as a seperate user, preferably in a jail - a guide to setting up jails can be found at https://help.ubuntu.com/community/BasicChroot

This is done to limit the damage an exploit in the software can cause - it will hopefully be limited to messing up teamspeak's files, but not the rest of the server.

Php and the webserver can often share a user since they need access to the same files.

No network service should run as root if it can be avoided because an exploit in that service could let an attacker get the same permissions as the user running it. Some software needs root permissions to start but can be configured to drop those permissions after it has started.

  • Can you provide a link to a guide on how to setup a service to drop its permission level after startup? – Mark Tomlin Jun 3 '12 at 0:51
  • It varies from program to program and should be in their documentation. Will update with a link on how to setup jails. – Grant Jun 3 '12 at 0:57

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.