disable perl without affecting cpanel

Discussion in 'General' started by abbasb, Jul 26, 2012.

  1. abbasb

    abbasb New Member

    i have litespeed and cpanel both together
    hoe can i disable perl and python permanently and securely for all users without affecting cpanel
    there are many methods but all of them have some problems.
    for example cpanel use perl and if we chmod perl bin directory some of cpanel functions will fails.
    or if i change handler or mime types a user can reenable them by using an costume mime type
    or if i disallow extensions by mod_security a user can change extension and run them
  2. webizen

    webizen New Member

    just revoke/remove execution permission of the perl/python binary
  3. abbasb

    abbasb New Member

  4. webizen

    webizen New Member

    Try
    "DisableCgiOverride On" is to prevent user from adding things like "AddHandler cgi-script .cgi .pl" at local .htaccess level.
  5. abbasb

    abbasb New Member

    Hi added the -ExecCGI to /usr/local/apache/conf/includes/post_virtualhost_global.conf but .pl files still running.
    my post_virtualhost_global.conf file is below
    Code:
    <Directory "/home">
            Options +All -FollowSymLinks +IncludesNOEXEC -Indexes +MultiViews +SymLinksIfOwnerMatch -ExecCGI
            AllowOverride All Options=Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    </Directory>
    please tell me how can i disable .pl file running in litespeed also no one can override it.
  6. webizen

    webizen New Member

    our lab test confirms that adding -ExecCGI in post_virtualhost_global.conf will disable .pl (cgi) from running. "DisableCgiOverride On" is by default for 4.2.*.

    you can try uncheck ExecCGI in WHM "Home => Service Configuration => Apache Configuration => Global Configuration"
    Last edited: May 30, 2013

Share This Page