By default, cPanel servers include C and C++ compilers. Allowing regular users to access these compilers can be risky and might lead to security issues. To improve security, you can restrict access to these compilers through WHM.
This guide explains how to manage C and C++ compiler access using WHM.
Steps to Manage Compiler Access
Step 1: Log in to your WHM panel. You can do this by entering your server’s IP address or hostname followed by port 2087.
Example:
https://192.168.2.152:2087
or
https://server.demovpstest.com:2087
Step 2: In WHM, click on the Security Center icon.
Step 3: Click on Compiler Access.
Step 4: To allow compilers for all regular (unprivileged) users, click Enable.
To block compiler access for them, click Disable.
Alternative Solution:
Sometimes, you may need to turn on compiler access using the terminal or SSH. This is helpful when the WHM panel isn’t working, or you’re managing the server remotely through the command line. This method is also helpful for solving build or compilation issues on the server.
Step 1: Log in to your cPanel/WHM server using SSH.
Step 2: To enable compiler access, run this command in the terminal:
/scripts/compilers on
Step 3: To disable compiler access, run this command:
/scripts/compilers off
Conclusion:
Turning on the compiler in WHM helps developers and system admins compile software and run builds without problems. You can enable it easily by going to "Compiler Access" under the Security Center in WHM and clicking a few buttons.
If WHM isn’t working or you’re managing the server remotely, you can also enable compiler access through the terminal using SSH. This is helpful for automation, scripts, or fixing build issues.
Whether you use WHM or the terminal, enabling the compiler gives you better control and flexibility for server-related tasks.