Page 1 of 1

ownership of files, for php as fastcgi

Posted: 2011/01/03 15:08:43
by spykee
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?

Thanks

ownership of files, for php as fastcgi

Posted: 2011/01/03 15:53:07
by pschaff
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.

http://serverfault.com/questions/113757/how-to-configure-apache-document-root