Hook denied execution of killacct: Failed to execute hook /usr/share/cloudlinux/hooks/cpanel/prekillacct

If you are getting error while terminating cPanel account "Hook denied execution of killacct: Failed to execute hook /usr/share/cloudlinux/hooks/cpanel/prekillacct; you can find logs in /var/log/cloudlinux/hooks/info.log and contact CloudLinux Support if you need help with the issue." 

It looks like the error you're encountering is related to a broken or missing Python module (wpos_modify_user_hook) used by CloudLinux in combination with AccelerateWP.

Based on the solution you've mentioned, here are the steps you can follow to resolve the issue:

Solution 1: Check for Missing Symlink (CloudLinux Shared Pro)

If you're using CloudLinux Shared Pro, follow these steps to ensure that the symlink is not broken:

  1. Check the Symlink Verify that the symlink in /usr/share/cloudlinux/hooks/listeners/ is pointing to the correct file:

    ls -l /usr/share/cloudlinux/hooks/listeners/
    

    You should see a symlink for wpos_modify_user_hook.py pointing to /opt/cloudlinux/venv/lib/python3.11/site-packages/lve_utils/hooks/sync_map_hook.py. If it's broken or missing, you can recreate the symlink:

  2. Recreate the Symlink (If Broken) If the symlink is broken or missing, recreate it by running:

     
    ln -s /opt/cloudlinux/venv/lib/python3.11/site-packages/lve_utils/hooks/sync_map_hook.py /usr/share/cloudlinux/hooks/listeners/wpos_modify_user_hook.py
    
  3. Test the Account Removal Again Try removing the account again:

     
    /scripts/removeacct <username>
    

Solution 2: Remove AccelerateWP (CloudLinux Shared)

If you're not using CloudLinux Shared Pro, you will need to remove the AccelerateWP package and the corresponding hook file.

  1. Remove the AccelerateWP Package Run the following command to uninstall the AccelerateWP package:

     
    yum remove acceleratewp
    
  2. Remove the Broken Hook File Remove the broken or unused hook file:

     
    rm -f /usr/share/cloudlinux/hooks/listeners/wpos_modify_user_hook.py
    
  3. Test the Account Removal Again Once you've removed the package and the hook file, try removing the account again:

     
    /scripts/removeacct <username>
    

Final Step: Restart cPanel

After performing any of the above steps, restart cPanel services to ensure the changes take effect:

 
systemctl restart cpanel

If the issue persists, it would be worth contacting CloudLinux support for further investigation, as the issue may be deeper within the CloudLinux configuration.

  • Hook denied execution of killacct cpanel
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

How to access server via Remote Desktop (RDP)?

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a...

How to install Let’s Encrypt on CentOS 7 with Apache?

Today, we will show you, How to install Let’s Encrypt on CentOS 7 with Apache. Let’s Encrypt is a...

Domains are not showing in WHM -> List accounts

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

HOW TO INSTALL LITESPEED WEB SERVER IN LINUX SERVER?

Litespeed Cache is useful to increase high performance for your Wordpress Website. Following are...

Remove ONLY_FULL_GROUP_BY in my.cnf file

Remove ONLY_FULL_GROUP_BY in my.cnf file First you need to find my.cnf file location and then...