Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    604

    Default Question about suPHP and Cgi Mode

    It is my understanding that suPHP forces php scripts to run as the user right?

    However, does this mean that we have to run php5 in cgi mode for the processes to show as the user?

    The reason I ask is I have php5 running suPHP, but in dso mode, and the php processes are still showing as "nobody". Do I have to turn on cgi mode as well?

  2. #2
    Member
    Join Date
    Jun 2003
    Posts
    27

    Default

    I would just say "yes" but apparently you have to post at least 10 chars. So now I have two sentences instead!

  3. #3
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    Quote Originally Posted by noimad1 View Post
    It is my understanding that suPHP forces php scripts to run as the user right?

    However, does this mean that we have to run php5 in cgi mode for the processes to show as the user?

    The reason I ask is I have php5 running suPHP, but in dso mode, and the php processes are still showing as "nobody". Do I have to turn on cgi mode as well?
    I have been using SuPHP for a number of years now even back when phpSuExec
    was still popular and was the only thing most people knew about despite the
    general securitymess phpSuExec was making of things at the time under the
    delusion of helping security. Unlike phpSuExec, SuPHP really does help in terms
    of your general security and being able to track user script execution better.

    Anyway, to answer your question and so you know how suPHP functions ...

    1. PHP itself has to be compiled as a CGI in order to be linked to SuPHP.

    2. SuPHP itself is an Apache DSO module that **CALLS** the PHP CGI binary
    and executes it which the owner and permissions of the account from
    where the PHP script is being executed.

    So know you understand a little more how SuPHP functions. It is an Apache
    module that calls the PHP CGI binary usually located at /usr/local/bin/php-cgi.
    The PHP portion is run as a CGI binary and is **NOT** an Apache module!

    (Side Note: I don't recommend FastCGI for servers running SuPHP)

    Configured properly, SuPHP will give you a great boost in security and
    allow you to more closely monitor script executions and keep log records
    that trace back to account origins plus users will be better restricted
    to their own accounts and not so easily wander into other user's accounts.
    Last edited by Spiral; 06-13-2009 at 02:03 AM.

Similar Threads & Tags
Similar threads

  1. Suphp to Fast cgi how to?
    By ASTRAPI in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-30-2009, 05:00 PM
  2. PHP Safe Mode,suPHP,MySql
    By NightRider in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-17-2008, 12:36 PM
  3. Can't build Apache with php - CGI suPHP
    By Misiek in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-15-2007, 10:10 PM
  4. suphp and fast-cgi
    By serversolutions in forum New User Questions
    Replies: 12
    Last Post: 09-21-2007, 03:44 PM
  5. Aapache 2, Php CGI-MODE, LightTPD, MAILSCANNER!
    By tom_taylor in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 08-31-2007, 07:24 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube