Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Could not lock Apache configuration

Discussion in 'General Discussion' started by Amir.Az, Sep 30, 2017.

  1. Amir.Az

    Amir.Az Registered

    Joined:
    Sep 30, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    I can't add a new domain or subdomain in my host with Cpanel and that error is:

    Code:
    exit level [die] [pid=8465] (Could not lock Apache configuration: Cpanel::Exception::IO::ChmodError/(XID bww8ch) The system failed to set the permissions on one or more immutable (+i) filesystem nodes to “0600” (as EUID: 0, EGID: 0) because of the following error: Operation not permitted at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 330, <$socket> line 1. Cpanel::Exception::create("IO::ChmodError", ARRAY(0x3163148)) called at /usr/local/cpanel/Cpanel/Exception.pm line 46 Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, ARRAY(0x3163148)) called at /usr/local/cpanel/Cpanel/Autodie/Perms.pm line 38 Cpanel::Autodie::Perms::chmod(384, GLOB(0x3166340)) called at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 167 Cpanel::Transaction::File::Base::_set_permissions(GLOB(0x3166340), 384, undef) called at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 110 Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/Transaction.pm line 19 eval {...} called at /usr/local/cpanel/Cpanel/Transaction.pm line 19 Cpanel::Transaction::get_httpd_conf() called at /usr/local/cpanel/Cpanel/ApacheConf.pm line 610 Cpanel::ApacheConf::_loadhttpdconf_and_transaction(undef) called at /usr/local/cpanel/Cpanel/ApacheConf.pm line 532 Cpanel::ApacheConf::loadhttpdconf() called at /usr/local/cpanel/Cpanel/HttpUtils/Domain.pm line 96 Cpanel::HttpUtils::Domain::domainExistsInConf_vhost_name("sub.mydomain.com") called at /usr/local/cpanel/Cpanel/Validate/Component/Domain/HasApacheConfEntry.pm line 44 Cpanel::Validate::Component::Domain::HasApacheConfEntry::validate(Cpanel::Validate::Component::Domain::HasApacheConfEntry=HASH(0x3078c78)) called at /usr/local/cpanel/Cpanel/Validate/Validator.pm line 45 Cpanel::Validate::Validator::validate(Cpanel::Validate::DomainCreation::Sub=HASH(0x3165f08)) called at /usr/local/cpanel/Cpanel/Sub.pm line 121 Cpanel::Sub::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 98 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 89 Try::Tiny::try(CODE(0x313e000), Try::Tiny::Catch=REF(0x313de68)) called at /usr/local/cpanel/Cpanel/Sub.pm line 125 Cpanel::Sub::addsubdomain(__CPANEL_HIDDEN__, 0, __CPANEL_HIDDEN__, 1, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, ...) called at bin/admin/Cpanel/domain.pl line 199 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 94 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 89 Try::Tiny::try(CODE(0x3123458), Try::Tiny::Catch=REF(0x164a038)) called at bin/admin/Cpanel/domain.pl line 212 )
    And also I was problem in chmod command then I fixed it (with reinstalled coreutiles )
    but I have this problem in cpanel again.

    Regards
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,488
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    Have you locked the apache configuration manually?
     
    Amir.Az likes this.
  3. Amir.Az

    Amir.Az Registered

    Joined:
    Sep 30, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    Thanks for your answer.
    If I rebuild it, I will lose my any info or configs?
     
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,488
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    Take backup of the Apache configuration first and then check.. Because if you lock the Apache configuration, no virtual host entry would be creating and creating account will fail..
     
  5. Amir.Az

    Amir.Az Registered

    Joined:
    Sep 30, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    Thank you:)
    So how I can do this job?
    And if I do it then Will cpanel response?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Check to see if the immutable attribute is applied to the httpd.conf file with a command like this:

    Code:
    lsattr /etc/apache2/conf/httpd.conf
    If so, you can remove that immutable attribute with the following command:

    Code:
    chattr -i /etc/apache2/conf/httpd.conf
    Once you do this, you can rebuild the Apache configuration file with the following command:

    Code:
    /scripts/rebuildhttpdconf
    You will need to follow the instructions on the following document if you want to make custom changes to the Apache configuration:

    Advanced Apache Configuration - EasyApache 4 - cPanel Documentation

    Thank you.
     
Loading...

Share This Page