How to Enable/Disable Compiler Access in cPanel/WHM Server

How to Enable/Disable Compiler Access in cPanel/WHM Server

 

Allowing Compiler Access to unprivileged users is a security risk so you must disable C and C++ compilers for those users. You must have server root access to enable/disable compilers.

1. Log in to WHM as ‘root’ user

2. Search for ‘Compiler Access’ in WHM search bar

3. Select ‘Compiler Access’ under ‘Security Center’

Check the current status of compiler access : ‘Compilers are enabled for unprivileged users’
 

Compilers status

Compilers status


 
4. Click on ‘Disable Compilers’ to Disable C and C++ compilers. ‘Enable Compilers’ option will enable compiler access for unprivileged users.

Compiler access will be disabled for all users when you click on Disable Compilers.
 

Enable/Disable Compiler access

Enable/Disable Compiler access


 
Disable Compilers cPanel

Disable Compilers cPanel


 
It is possible to enable compiler access for specific users. Click on ‘Allow specific users to use the compilers’ to enable for specific users.
 
Enable compiler specific users

Enable compiler specific users


 
Log into linux server via SSH to make sure compilers are disabled.
 

[root@server2 ~]# ls -l /usr/bin/gcc
-rwxr-x— 2 root compiler 768592 Nov 19 2015 /usr/bin/gcc