Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to start the process of learning to manage my own server and leave cPanel / WHM behind. I've just purchased a VPS (Linode) running Ubunutu. I'm going to he hosting multiple sites on there under a LAMP stack.

Anyway, my question is, is it better to create a new user for each site I host and store the files under each, or create one "sites" user and store all the site files under that one user?

Thanks.

share|improve this question
1  
you mean something like a "sites" user with access to all folders or "customer1" with their own folder, "customer2" with their own, etc? I'd go for the latter - what happens if your core user got compramised? –  tombull89 Feb 16 '13 at 15:32

1 Answer 1

If done properly, multiple users (e.g. one for each website) limit the damage that can occur if you are hacked. If you share all the files under a single user, and one website is compromised, then the attacker can read the files for every website the server. Typically, they'll go for (database) configuration files.

Having multiple users limits this kind of attack to just the website that is vulnerable, which limits the damage that can occur.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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