If you are facing ImunifyAV permission denied issue or”sh: 1: /usr/local/CyberCP/public/imunifyav/classes/panels/../../bin/execute.py: Permission denied” in your CyberPanel after upgrade then follow this tutorial. You will find a complete solution on how to fix ImunifyAV issue in CyberPanel.
Understand the Issue behind ImunifyAV permission denied
Before we talk about the solution, let’s understand what’s causing the “Permission denied” error. This error typically occurs when the system denies the necessary permissions to execute a specific file in CyberPanel. This could happen due to various reasons, such as incorrect file permissions, ownership issues, or conflicts with security settings.
You will mostly face this issue after running the CyberPanel upgrade script. Here is the issue I raised but this bug still causing problems for many users. So I came up with a solution that fixes the below issue –
sh: 1: /usr/local/CyberCP/public/imunifyav/classes/panels/…/…/bin/execute.py: Permission denied
The error message “sh: 1: /usr/local/CyberCP/public/imunifyav/classes/panels/../../bin/execute.py: Permission denied” means that you do not have the necessary permissions to execute the file
Before getting started, make sure you have the latest version of CyberPanel. You can setup an Auto update on CyberPanel.
Quick Solution (Recommended)
Login to SSH and run this command in your terminal to fix the issue.
wget -qO ImunifyAV-permission-denied-Solution.sh https://gist.githubusercontent.com/TheMukeshPatel/97437e8f527c7ef358da50a26960ed3b/raw/631601190c692ba5924dbc9bbcdd7307921a3897/ImunifyAV-permission-denied-Solution.sh && chmod +x ImunifyAV-permission-denied-Solution.sh && ./ImunifyAV-permission-denied-Solution.sh
chmod +x /usr/local/CyberCP/public/imunifyav/classes/panels/../../bin/execute.py
This command gives the necessary permissions to execute the file execute.py.
Follow these steps to solve your Imunify permission denied issue in CyberPanel
- Log in to your server as root user.
- Navigate to the imunifyav directory:
- Change the permissions of the execute.py file to executable:
chmod +x ./bin/execute.py
- Try to access ImunifyAV again. The error should be gone.
The “+x” flag grants execute permissions to the file. Now try executing the file again to see if the error is resolved.
If you are still having problems, you can contact the CyberCP support team for help. You can also comment below.