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.

IP Deny Manager issue

Discussion in 'General Discussion' started by thaimor, Jan 9, 2009.

  1. thaimor

    thaimor Registered
    PartnerNOC

    Joined:
    Jul 17, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    We have a problem with cPanel IP Deny Manager on one account.
    When ever we try to add some IP through IP deny Manager, it's trowing out error:

    Error: while opening /usr/local/apache/htdocs/.htaccess

    That cPanel user does not have rights to write in that file, but I can't find why is it even trying to write there.
    Funny thing is that IP is properly added in that account's .htaccess:

    /home/$username/public_html/.htaccess

    DocumentRoot for that account is set properly:

    DocumentRoot /home/$username/public_html

    So, it's working, but there is that error every time.

    It's happening only for one account on that server, other accounts are OK.

    It's a VPS, running cPanel 11, Release.

    Here is a full error from cPanel error log:


    Code:
    touch: cannot touch `/usr/local/apache/htdocs/.htaccess': Permission denied
    touch: cannot touch `/usr/local/apache/htdocs/.htaccess': Permission denied
    2009-01-09 08:33:04 warn [Cpanel::FileUtils::TouchFile] Failed to create /usr/local/apache/htdocs/.htaccess: No such file or directory at /usr/local/cpanel/Cpanel/FileUtils/TouchFile.pm line 69
            Cpanel::FileUtils::TouchFile::touchfile('/usr/local/apache/htdocs/.htaccess') called at /usr/local/cpanel/Cpanel/DenyIp.pm line 32
            Cpanel::DenyIp::_HtaccessCompatCheck() called at /usr/local/cpanel/Cpanel/DenyIp.pm line 188
            Cpanel::DenyIp::DenyIp_adddenyip('195.29.150.3') called at (eval 73) line 1
            eval 'Cpanel::DenyIp::DenyIp_adddenyip(@{$argref});' called at cpanel.pl line 1637
            main::exectag('<cpanel DenyIp="adddenyip($FORM{\'ip\'})">') called at cpanel.pl line 4742
            main::dotag(undef) called at cpanel.pl line 4625
            main::cpanel_parseblock(SCALAR(0x93a5ef0)) called at cpanel.pl line 4577
            main::cpanel_parse(GLOB(0x96c4988)) called at cpanel.pl line 1303
    touch: cannot touch `/usr/local/apache/htdocs/.htaccess': Permission denied
    touch: cannot touch `/usr/local/apache/htdocs/.htaccess': Permission denied
    2009-01-09 08:33:05 warn [Cpanel::FileUtils::TouchFile] Failed to create /usr/local/apache/htdocs/.htaccess: No such file or directory at /usr/local/cpanel/Cpanel/FileUtils/TouchFile.pm line 69
            Cpanel::FileUtils::TouchFile::touchfile('/usr/local/apache/htdocs/.htaccess') called at /usr/local/cpanel/Cpanel/DenyIp.pm line 260
            Cpanel::DenyIp::DenyIp_adddenyip('195.29.150.3') called at (eval 73) line 1
            eval 'Cpanel::DenyIp::DenyIp_adddenyip(@{$argref});' called at cpanel.pl line 1637
            main::exectag('<cpanel DenyIp="adddenyip($FORM{\'ip\'})">') called at cpanel.pl line 4742
            main::dotag(undef) called at cpanel.pl line 4625
            main::cpanel_parseblock(SCALAR(0x93a5ef0)) called at cpanel.pl line 4577
            main::cpanel_parse(GLOB(0x96c4988)) called at cpanel.pl line 1303
    
    Any idea would be appreciated.

    Thanks
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Does the account in question have a domain that is a sub-domain of the server hostname?
     
  3. thaimor

    thaimor Registered
    PartnerNOC

    Joined:
    Jul 17, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Yes. As the matter of fact, domain used in server's hostname is added as parked domain on that account.
    In that case, should changing hostname to mian domain from that account help?
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This is something that will be addressed in 11.24.4 or later.
     
  5. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    is this useful tool ??

    if i block an IP or domain will it work for a domain or whole server ??

    same thing will work for incoming/outgoing emails ??????
     
    #5 crazyaboutlinux, Apr 16, 2009
    Last edited: Apr 16, 2009
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The IP Deny Manager in the cPanel interface (not to be confused with Host Access Control in WHM) will only work for HTTP and HTTPS traffic for the websites hosted by that cPanel account. It will not work for other services (such as email) nor affect other users on the server.

    This is very useful if you want to prevent someone or a group of people from visiting your website. This can be particularly effective if you run an internet forum and want to go beyond just using the ban feature built into the software and block people from your entire website.
     
Loading...

Share This Page