The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What's the difference between scgi-bin and cgi-bin?

Discussion in 'General Discussion' started by jols, Feb 25, 2009.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    In cPanel ---> CGI Center ---> We have this:

    Simple CGI Wrapper
    This is a CGI Wrapper that will allow you to run CGI Scripts with your User ID.

    There is already a cgi-bin within the account. So what's the difference between scgi-bin and cgi-bin?
     
  2. hzsanjay

    hzsanjay Member

    Joined:
    Feb 25, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    The "cgi-bin" directory is the location you will use to store your Perl or compiled script files. Any files you place in it will be treated as programs (instead of HTML pages or images), and will be "run" by the server instead of displayed normally . The "cgi-bin" is configured default


    The scgi-bin directory, used a CGI wrapper to run CGI programs as the user's own user and group ID's, instead of the web server's global user. This allows you to set lower permissions on files too, to protect anyone but your user (and the web server) from executing or viewing them. The scgi-bin is not configured by default.

    Regards,

    Sanjay Ragav
    HostingZoom | ResellerZoom
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks Sanjay,

    I sort of understand what you are talking about. But doesn't suEXE already take care of this part, "...to protect anyone but your user (and the web server) from executing or viewing them"?

    What would be a good example of a script app that would be better to run from the scgi-bin than in the cgi-bin?

    Thanks again for your response!
     
  4. hzsanjay

    hzsanjay Member

    Joined:
    Feb 25, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Note that , when I say the web server (like Apache) , it can only execute by them, and no one can view your source, not even the global user, whereas it can for files in the cgi-bin directory, unless a CGI wrapper like SuEXEC is implemented for your entire account on your virtual host directive in the web server. More information about SuEXEC can be found at http://www.apache.org.

    suexec - Switch user before executing external programs
    -----------------------
    http://httpd.apache.org/docs/2.0/programs/suexec.html
    -----------------------
     
  5. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Right, I meant to say "suEXEC".

    So, seeing that suEXEC is implemented for the entire server... does this then render scgi-bin moot?

    Sorry, if I seem a little too dense about this one. I've been trying to grasp the benefits of putting in a scgi-bin dir for quite a while.
     
Loading...

Share This Page