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:
-
Check the Symlink Verify that the symlink in
/usr/share/cloudlinux/hooks/listeners/
is pointing to the correct file: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: -
Recreate the Symlink (If Broken) If the symlink is broken or missing, recreate it by running:
-
Test the Account Removal Again Try removing the account again:
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.
-
Remove the AccelerateWP Package Run the following command to uninstall the AccelerateWP package:
-
Remove the Broken Hook File Remove the broken or unused hook file:
-
Test the Account Removal Again Once you've removed the package and the hook file, try removing the account again:
Final Step: Restart cPanel
After performing any of the above steps, restart cPanel services to ensure the changes take effect:
If the issue persists, it would be worth contacting CloudLinux support for further investigation, as the issue may be deeper within the CloudLinux configuration.