ownership of files, for php as fastcgi

Support for webhosts that use CentOS
Post Reply
Posts: 2
Joined: 2011/01/03 14:50:39

ownership of files, for php as fastcgi

Post by spykee » 2011/01/03 15:08:43

Hi again,

Sorry for this two post in a row, hope someone can give me a quick answer.
I'm currently running my php scripts using mod_php. Now I've decided to change this to fastcgi, although it has some drawbacks, I believe it's still better compared to mod_php in terms of security.

Anyway, what's the best practice for running php as fastcgi?
Currently my files, are owned by root user in sandbox and fastcgi is working well. But considering that I will be having two or more sites on the server, should I do the following?
1. Create a user account for each domain with /sbin/nologin shell?
2. Chmod recursively those files in the web root of each domain to its respective user?

Or it's fine to leave those files as owned by root?


Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

ownership of files, for php as fastcgi

Post by pschaff » 2011/01/03 15:53:07

Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users.

Having the files owned by root, with read permission for the user running the server, seems to be the general practice.


Post Reply

Return to “CentOS 5 - Webhosting Support”