Results 1 to 11 of 11

Thread: Disable python on apache

  1. #1
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Disable python on apache

    please help me disable python on apache

    demo : cgi-shell.py - a CGI by Fuzzyman

    thank all

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Disable python on apache

    You could try setting 700 on /usr/bin/python binary. I tested and even with that permission set, yum was able to update as root. It's possible you might have other areas unable to function with that, but the main reason python is even needed is for yum with CentOS to work.

    Of note, we don't provide mod_python, so these are technically CGI scripts being discussed.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    Server A:
    cgi-shell.py - a CGI by Fuzzyman
    have chmod is : 0644
    have python working on system.
    python file do not work in apache.

    /usr/bin/python have chmod is : 755

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Disable python on apache

    Did you try changing /usr/bin/python to 700 like I stated? You asked what to do, and I told you that you could try changing it to 700 file permissions in my initial post.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    Quote Originally Posted by cPanelTristan View Post
    Did you try changing /usr/bin/python to 700 like I stated? You asked what to do, and I told you that you could try changing it to 700 file permissions in my initial post.
    This prevents some of the cpanel process.
    And can not make your way to /usr/bin/perl

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Disable python on apache

    What cPanel processes other than mailman would be impacted? yum can still provide updates. Knowing which processes would be helpful.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    if /usr/bin/perl ?

  8. #8
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Disable python on apache

    I don't understand your response. /usr/bin/python isn't the same binary as /usr/bin/perl and the only python processes I know are yum (which still runs when /usr/bin/python is chmod to 700) and mailman
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  9. #9
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    Then chmod 700 /usr/bin/perl

    Change Password
    <div id="cpanel_internal_error_1" style="display:none;"><textarea style="font-weight:900;background-color:#fcc;" rows="15" cols="80">open3: exec of /usr/local/cpanel/bin/securechpass failed at /usr/local/cpanel/Cpanel/ChangePasswd.pm line 258 Carp::croak('open3: exec of /usr/local/cpanel/bin/securechpass failed') called at /usr/local/cpanel/perl/IPC/Open3.pm line 230 IPC::Open3::_open3('open3', 'Cpanel::ChangePasswd', 'GLOB(0x8c5c720)', 'GLOB(0x8c5c740)', '>&STDERR', '/usr/local/cpanel/bin/securechpass') called at /usr/local/cpanel/perl/IPC/Open3.pm line 291 IPC::Open3:pen3('GLOB(0x8c5c720)', 'GLOB(0x8c5c740)', '>&STDERR', '/usr/local/cpanel/bin/securechpass') called at /usr/local/cpanel/Cpanel/ChangePasswd.pm line 258 Cpanel::ChangePasswd::_change_password_withpasswd('laemdo1', 'laemdo11') called at /usr/local/cpanel/Cpanel/ChangePasswd.pm line 147 Cpanel::ChangePasswd::change_password('current_password', 'laemdo1', 'new_password', 'laemdo11', 'user', 'code', 'optional_services', 'HASH(0x90a78b0)') called at /usr/local/cpanel/Cpanel/Passwd.pm line 73 Cpanel::Passwd::_change_password('laemdo1', 'laemdo11', '') called at /usr/local/cpanel/Cpanel/Passwd.pm line 25 Cpanel::Passwd::api2_change_password('newpass', 'laemdo11', 'enablemysql', '', 'oldpass', 'laemdo1') called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 104 eval {...} called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 104 Cpanel::Api2::Exec::api2_exec('Passwd', 'change_password', 'HASH(0x90a7c00)', 'HASH(0x1b303e0)') called at cpanel line 633 main::real_cpexectag('<?cp Passwd::change_password(% [div style="clear:right;" id="srv...') called at cpanel line 3939 main::dotag_finished_headers(0) called at cpanel line 3770 main::cpanel_parseblock('<cpanel setvar="headerimg=../images/toppassword.gif">^J<cpanel se...') called at cpanel line 3685 main::cpanel_parse('GLOB(0x8c4ef80)') called at cpanel line 5098 main::run_standard_mode() called at cpanel line 428 </textarea></div> <span class="error" style="cursor:hand;cursorointer;" onClick="document.getElementById('cpanel_internal_error_1').style.display='block';this.style.display='none';">[a fatal error or timeout occurred while processing this directive]</span>Could not change password <div id="rawpwlnk" style="clear:both;"><a href="#" onclick="document.getElementById('rawpw').style.display='block';document.getElementById('rawpwlnk').style.display='none'; return false;">Show Raw Password Change</a></div> <script type="text/javascript"> document.getElementById('srvs').style.display='none'; </script> <div class="return-link"><a href="index.html">&larr; Go Back</a></div> </div><!-- end body-content --> <!-- START stdfooter.html --> <div class="clearitmed">&nbsp;</div> </div><!--Close Content Div--> <!--Start Footer--> <div id="heading-bottom_bg" class="spriteheading_bg footer"> <ul class="links footer_ul"> <li class="footer_li"><a class="footer_li_a bottomlink" href="http://forums.cpanel.net/index.html">Home</a></li> <li class="footer_li"><span class="footer" style="font-size:18px;">▪</span></li> <li class="footer_li"><a class="footer_li_a" href="http://forums.cpanel.net/trademarks.html" target="_blank">Trademarks</a></li> <li class="footer_li"><span class="footer" style="font-size:18px;">▪</span></li> <li class="footer_li"><a onclick="show_help(); return false;" target="_blank" href="http://forums.cpanel.net/help.html?url=/frontend/x3/passwd/changepass.html" class="bottomlink footer_li_a">Help</a></li> <li class="footer_li"><span style="font-size:18px;">▪</span></li> <li class="footer_li"><a href="http://www.cpanel.net/docs/cpanel/index.cgi?build=11.32.3.19&amp;basetheme=x3&amp;theme=x3" target="_blank" class="bottomlink footer_li_a">Documentation</a></li> <li class="footer_li"><span style="font-size:18px;">▪</span></li> <li class="footer_li"><a href="http://forums.cpanel.net/contact/contactinfo.html" class="bottomlink footer_li_a" target="_blank">Contact</a></li> <li class="footer_li"><span style="font-size:18px;">▪</span></li> <li class="footer_li"><a href="/logout/?locale=en" class="bottomlink footer_li_a">Logout</a></li> </ul> </div> <!--End Footer--> </div><!--Close border-efx div--> </div><!--Close cpanel div--> <!-- Start Help Code --> <div style="display:none;" id="win"> <div class="hd"> <div class="lt"></div> <span>Interface Help</span> <div class="rt"></div> </div> <div class="bd"> <div class="content" id="help-content" style="height:400px;">  <h2>Change password</h2> <p>This page displays whether you successfully changed your password.</p> <ul> <li>To view details about the password change, click <em>Show Raw Password Change</em>.</li> <li>To return to the previous page, click <em>Go Back</em>.</li> </ul> <div id="helplinks"> <h2>Help Links:</h2> <ul> <li><a href="http://www.cpanel.net/docs/cpanel/index.cgi?build=11.32.3.19&amp;basetheme=x3&amp;theme=x3" target="_blank" class="bottomlink">Full Interface Documentation</a></li> <li><a href="http://forums.cpanel.net/tutorial.html" target="_blank">Video Tutorials</a></li> <li> <a href="http://forums.cpanel.net/contact/contactinfo.html" target="_blank">Contact Customer Support</a> </li> </ul> </div> </div> </div> </div> <!-- End Help Code --> <!-- Begin js2 auto include --> <script type="text/javascript"> //<![CDATA[ //]]> </script> <!-- End js2 auto include --> </body> </html> <!-- END stdfooter.html --> <!-- cPanel [11.32] (pro,vps,attracta,vps) Copyright (c) 2012 cPanel, Inc. Licensed on server.xyz.com -->

  10. #10
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    How can you make error for cgi code as below :
    lscgid: execve():file.cgi: Permission denied

  11. #11
    Member
    Join Date
    Feb 2012
    Posts
    31
    cPanel/WHM Access Level

    Website Owner

    Default Re: Disable python on apache

    Ticket Id 2801686


    We want every customer to have a good experience with our support and our software. Our team is willing to go to great lengths to ensure that is the case. We are sorry but customizing the configurations of network services is beyond the scope of cPanel support. To correct this issue we recommend enlisting a system administrator.

    You can browse our list of sysadmins here. Sys Admin Services | cPanel App Catalog

    Thank you for your understanding!
    cPanel do not support

Similar Threads

  1. python -V python: error while loading shared librarie
    By shopcentar in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 10-18-2011, 09:32 AM
  2. Python Python 2.7.1 Installation
    By sgate1 in forum cPanel & WHM Discussions
    Replies: 9
    Last Post: 08-11-2011, 07:18 PM
  3. Disable apache logs
    By ASTRAPI in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 03-08-2010, 02:47 AM
  4. How to Disable keepalives in Apache 2.2?
    By Fillos in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 01-24-2008, 11:51 AM
  5. Yum / python issue on build apache
    By areha in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 09-07-2005, 05:20 AM