CyberPanel is one of the most popular free control panels based on LiteSpeed and OpenLiteSpeed web servers. It has most of the features that a user needs to manage its websites. But it has a lot of bugs. And one of these is the “ImunifyAV permission denied issue”. Many users reported this error after upgrading CyberPanel.
So I shared this quick fixing tutorial. This will be absolutely helpful if you are facing an 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 the ImunifyAV issue in CyberPanel.
If this below code works for your website than please share your review in comment section.
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.
In CyberPanel, this issue is definitely related to the incorrect file permissions and here is the fix code.
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 execute.py
.
Before getting started, make sure you have the latest version of CyberPanel. You can set up 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
OR
chmod +x /usr/local/CyberCP/public/imunifyav/classes/panels/../../bin/execute.py
This command gives the necessary permissions to execute the file execute.py.
Step-by-Step Solution:
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:
cd /usr/local/CyberCP/public/imunifyav
- 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.
Thanks, it solved my issue on CyberPanel.
You’re welcome