I've just started hearing about ruid2 and wondering is it more secure then fcgid? I've heard that it is less secure and more problematic. Are there any differences between the two?
Is fastcgi the same has mod_fcgid
I'm using CPanel.
closed as not constructive by Wesley, EEAA♦, Scott Pack, Jeff Ferland, Michael Hampton♦ Aug 24 '12 at 6:30
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
These are comparing apples and oranges and bananas.
First, FastCGI is a protocol for communicating between a persistent application (or application server) and a webserver. A FastCGI-capable application runs on its own and receives requests from the webserver, then returns the responses to the webserver to give to the client. FastCGI was invented because there is a certain amount of overhead in starting a new program, loading libraries, reading configuration and so on. Much of that overhead can be avoided if you start the program once and keep it running for many requests.
Security-wise, normally apache switches to a non-root user (eg
I expect that you're asking this because you want to run PHP scripts as different users. In my experience, the typical way to run hosted PHP as the script's user is to use suexec without FastCGI so that each script is run as a separate process. Some people combine FastCGI and suexec by using mod_fastcgi to start at least one FastCGI server for every user of the system permitted to run scripts, then direct requests to the appropriate user's server. For systems with a lot of users, this can cause a lot of PHP processes and take up a lot of memory, but may still perform better than starting and stopping one PHP process for every single request. It seems to me that mod_ruid2 intends to achieve this by using mod_php rather than using CGI at all, but I would be wary that this could potentially break a lot of assumptions in mod_php. Off the top of my head persistent database connections could be accessed by the wrong user, or caches like APC might end up sharing code between users.