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.

What's the recommended method of doing Apache based PHP virtual hosting installations where each site would have one and just one user allocated for it?

  • Read and execute for one user per site only (not www-data or all users)
  • /srv/www installation folder (not /home, the user does not have a shell)
  • Write access limited to one folder

As I believe this would add some security against the cases where one site get compromised on a shared host.

I'd be grateful for pointers to tools, tutorials, etc.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Why not /home, just because the user doesn't have a shell? The whole process is quite straightforward, you just create the user-per-site, make the permissions appropriately, and then, most importantly, run PHP as the user (with suPHP or php-fpm). Sudo really never comes into it.

share|improve this answer
    
Thanks. I clarified the title - I mean sudo as "switch user" not sudo the command –  Mikko Ohtamaa Aug 31 '11 at 9:55

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.