There was a problem removing the subdomain

captainrau

Registered
Jun 20, 2020
4
0
1
USA
cPanel Access Level
Root Administrator
Hi,

We recently updated the cpanel version. We are currently experiencing a problem with subdomains. When we want to remove the subdomain from the cpanel interface, we get the following error.

There was a problem removing the subdomain “xxx.xxx.com”.
(XID en6qyq) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.

I add the detailed result below with the cpanel api.


Code:
warn [cpanel] Encountered error in SubDomain::delsubdomain: (XID 8gjvfq) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.
 at /usr/local/cpanel/Cpanel/EventHandler.pm line 47.
        Cpanel::EventHandler::_event(2, "post", "SubDomain", "delsubdomain", HASH(0x2c2c148), ARRAY(0x2e24608)) called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 179
        Cpanel::Api2::Exec::api2_exec("SubDomain", "delsubdomain", HASH(0x2c2c598), HASH(0x2c2c148)) called at cpanel.pl line 1373
        cpanel::cpanel::docpanelaction(HASH(0x2c2c340)) called at cpanel.pl line 4545
        cpanel::cpanel::run_fast_json_mode() called at cpanel.pl line 926
        cpanel::cpanel::script("cpanel::cpanel", "--json-fast-connect", "--stdin") called at cpanel.pl line 326
---
cpanelresult:
  apiversion: 2
  data:
    -
      reason: "(XID 8gjvfq) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.\n"
      result: 0
  error: "(XID 8gjvfq) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.\n"
  event:
    result: 1
  func: delsubdomain
  module: SubDomain
  postevent:
    result: 1
  preevent:
    result: 1
 

captainrau

Registered
Jun 20, 2020
4
0
1
USA
cPanel Access Level
Root Administrator
Can you show the API command you ran exactly? (Just replace the actual domain name)
cpapi2 --user=xxxx SubDomain delsubdomain domain=xxx.yyy.com

EDIT:

We recently updated cpanel.

v86 => v88

the error started to happen after that.

cpanel has been updated with the following command.

/scripts/upcp
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Thank you for that, unfortunately, I'm not able to replicate this issue on cPanel v88 and CentOS 7:

Bash:
[[email protected] ~]# cpapi2 --user=myuser SubDomain delsubdomain domain=sub.mydomain.net
---
cpanelresult:
  apiversion: 2
  data:
    -
      reason: The subdomain “sub.mydomain.net” has been removed.
      result: 1
  event:
    result: 1
  func: delsubdomain
  module: SubDomain
  postevent:
    result: 1
  preevent:
    result: 1
[[email protected] ~]#
Can you enable to the following at WHM>>Server Configuration>>Tweak Settings -> Standardized Hooks - Debug Mode and run it again via the command line or enable the portion that logs to the error_log and run this once more, then let me know what the output is

Thanks!
 

captainrau

Registered
Jun 20, 2020
4
0
1
USA
cPanel Access Level
Root Administrator
Thank you for that, unfortunately, I'm not able to replicate this issue on cPanel v88 and CentOS 7:

Bash:
[[email protected] ~]# cpapi2 --user=myuser SubDomain delsubdomain domain=sub.mydomain.net
---
cpanelresult:
  apiversion: 2
  data:
    -
      reason: The subdomain “sub.mydomain.net” has been removed.
      result: 1
  event:
    result: 1
  func: delsubdomain
  module: SubDomain
  postevent:
    result: 1
  preevent:
    result: 1
[[email protected] ~]#
Can you enable to the following at WHM>>Server Configuration>>Tweak Settings -> Standardized Hooks - Debug Mode and run it again via the command line or enable the portion that logs to the error_log and run this once more, then let me know what the output is

Thanks!
As you mentioned, I put the WHM debug mode on and run the command again. the output is as follows.

Code:
[2020-06-13 21:37:56 +0300] info [cpanel] ---debug_hooks---
[2020-06-13 21:37:56 +0300] info [cpanel]             msg: Beginning execution of script hook.
[2020-06-13 21:37:56 +0300] info [cpanel]         context: Cpanel::Api2::SubDomain::delsubdomain
[2020-06-13 21:37:56 +0300] info [cpanel]           stage: pre
[2020-06-13 21:37:56 +0300] info [cpanel]          result: 0
[2020-06-13 21:37:56 +0300] info [cpanel]           point: main
[2020-06-13 21:37:56 +0300] info [cpanel]              id: 7uPM9F9jwsiPRqpyJzlBepp1
[2020-06-13 21:37:56 +0300] info [cpanel]            hook: /usr/local/prospamfilter/bin/hook.php
[2020-06-13 21:37:56 +0300] info [cpanel]   escalateprivs: 1
[2020-06-13 21:37:56 +0300] info [cpanel]          weight: 100
[2020-06-13 21:37:56 +0300] info [cpanel] HOOK INFO: hook /usr/local/prospamfilter/bin/hook.php did not output any data
[2020-06-13 21:37:56 +0300] info [cpanel] ---debug_hooks---
[2020-06-13 21:37:56 +0300] info [cpanel]             msg: Finished execution of script hook.
[2020-06-13 21:37:56 +0300] info [cpanel]         context: Cpanel::Api2::SubDomain::delsubdomain
[2020-06-13 21:37:56 +0300] info [cpanel]           stage: pre
[2020-06-13 21:37:56 +0300] info [cpanel]          result: 1
[2020-06-13 21:37:56 +0300] info [cpanel]           point: main
[2020-06-13 21:37:56 +0300] info [cpanel]              id: 7uPM9F9jwsiPRqpyJzlBepp1
[2020-06-13 21:37:56 +0300] info [cpanel]            hook: /usr/local/prospamfilter/bin/hook.php
[2020-06-13 21:37:56 +0300] info [cpanel]   escalateprivs: 1
[2020-06-13 21:37:56 +0300] info [cpanel]          weight: 100
[2020-06-13 21:37:57 +0300] warn [cpanel] Encountered error in SubDomain::delsubdomain: (XID 943zrp) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.
at /usr/local/cpanel/Cpanel/EventHandler.pm line 47.
        Cpanel::EventHandler::_event(2, "post", "SubDomain", "delsubdomain", HASH(0x28b0a10), ARRAY(0x2af3758)) called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 179
        Cpanel::Api2::Exec::api2_exec("SubDomain", "delsubdomain", HASH(0x28b6e38), HASH(0x28b0a10)) called at cpanel.pl line 1373
        cpanel::cpanel::docpanelaction(HASH(0x28b6be0)) called at cpanel.pl line 4545
        cpanel::cpanel::run_fast_json_mode() called at cpanel.pl line 926
        cpanel::cpanel::script("cpanel::cpanel", "--json-fast-connect", "--stdin") called at cpanel.pl line 326
---
cpanelresult:
  apiversion: 2
  data:
    -
      reason: "(XID 943zrp) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.\n"
      result: 0
  error: "(XID 943zrp) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.\n"
  event:
    result: 1
  func: delsubdomain
  module: SubDomain
  postevent:
    result: 1
  preevent:
    result: 1
Code:
[2020-06-14 17:36:37 +0300] info [cpanel] The cacheid for the user “xxxexample_userxxx” was reset because it was in the future: Sun Jun 28 15:01:02 2020
[2020-06-14 17:36:38 +0300] info [cpwrapd] rebuild_files: working on domain (cpaneltestaddon.xxxexample-userxxxm.net)
[2020-06-14 17:36:38 +0300] info [cpwrapd] php-fpm: rebuild_files: restart fpm services for Apache
[2020-06-14 17:36:38 +0300] info [cpwrapd] php-fpm: fpm services restarted
[2020-06-14 17:36:38 +0300] info [cpwrapd] Rebuilding vhosts in apache conf
[2020-06-14 17:36:39 +0300] warn [cpanel] Encountered error in SubDomain::delsubdomain: (XID 6x79rv) Unsupported 'perm' option, please use 'octal_perms' instead. at /usr/local/cpanel/Cpanel/FileUtils/Chown.pm line 21.
 at /usr/local/cpanel/Cpanel/EventHandler.pm line 47.
        Cpanel::EventHandler::_event(2, "post", "SubDomain", "delsubdomain", HASH(0x224fb30), ARRAY(0x26ff6b8)) called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 179
        Cpanel::Api2::Exec::api2_exec("SubDomain", "delsubdomain", HASH(0x131e610), HASH(0x224fb30)) called at /usr/local/cpanel/Cpanel/Template/Plugin/Api2.pm line 62
        eval {...} called at /usr/local/cpanel/Cpanel/Template/Plugin/Api2.pm line 62
        Cpanel::Template::Plugin::Api2::_api2_exec("SubDomain", "delsubdomain", HASH(0x224fb30)) called at (eval 4) line 1
        eval {...} called at (eval 4) line 1
        eval {...} called at (eval 4) line 1
        Cpanel::Template::Shared::__ANON__(Template::Context=HASH(0x223c9a0)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 162
        eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 160
        Template::Document::process(Template::Document=HASH(0x224f950), Template::Context=HASH(0x223c9a0)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 352
        eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 322
        Template::Context::process(Template::Context=HASH(0x223c9a0), Template::Document=HASH(0x224f950)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Service.pm line 94
        eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template/Service.pm line 91
        Template::Service::process(Template::Service=HASH(0x223c580), "/usr/local/cpanel/base/frontend/paper_lantern/subdomain/dodel"..., HASH(0x1263c20)) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/x86_64-linux-64int/Template.pm line 66
        Template::process(Template=HASH(0x223c1d8), "/usr/local/cpanel/base/frontend/paper_lantern/subdomain/dodel"..., HASH(0x1263c20), SCALAR(0x1311110)) called at /usr/local/cpanel/Cpanel/Template.pm line 483
        Cpanel::Template::process_template("cpanel", HASH(0x1263c20), HASH(0x1326f50)) called at cpanel.pl line 1107
        cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/paper_lantern/subdomain/dodel"..., 1) called at cpanel.pl line 4606
        cpanel::cpanel::run_standard_mode() called at cpanel.pl line 930
        cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/subdomain/dodeldomain.html.tt") called at cpanel.pl line 326
[2020-06-14 17:36:39 +0300] info [cpanel] The cacheid for the user “xxxexample_userxxx” was reset because it was in the future: Sun Jun 28 15:02:57 2020
[2020-06-14 17:36:39 +0300]: “/usr/local/cpanel/scripts/restartsrv_apache_php_fpm --graceful” called by (1294218 - queueprocd - process - restartsrv)
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
In that case I am at a loss, I don't know what is causing that error - besides having incorrect perms on a file it's attempting to remove or some interference from a plugin but if those are fine I believe this would need to get investigated further by our analysts.
Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!