Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Grant Compiler Access to Users in WHM

This guide shows how to allow or block compilers for cPanel users. You need root access in WHM.

WHM2 min read11 steps5 screenshots

What is a compiler?

A compiler turns program code that people can read into a program that a computer can run. Common ones are gcc and g++. Think of it as a translator who turns a recipe into a finished meal.

Some software needs a compiler when you install it. But on a shared server, compilers can help a hacker build harmful tools. So many servers block them for normal users. This is why cPanel has a setting to allow or deny compiler use.

Turn compilers off or on for everyone

  1. Log in to WHM as root.
    Screenshot: Log in to WHM as root .
  2. Search for Compiler Access in the search box.
  3. Open Compiler Access. It is under Security Center.
  4. Choose Disable Compilers to block all users, or Enable Compilers to allow all.
  5. Click Save or confirm when asked.

When compilers are disabled, only the root user can use them.

Allow only certain users

You can keep compilers off for most people and allow just a few.

  1. Open Compiler Access in WHM.
    Screenshot: Open Compiler Access in WHM.
  2. Look for the list of users, or the "Use compilers" setting for each account. Wording can differ between versions.
    Screenshot: Look for the list of users, or the "Use compilers" setting for each account. Wording can d
  3. Tick the users who may use compilers.
  4. Save the change.

On many servers, this works through a user group called compiler. Only members of the group can run the compiler. You can also add a user to the group over SSH. SSH is a safe way to type commands to the server:

usermod -aG compiler username

This command adds the user to the compiler group. Replace username with the real account name. If the group does not exist, use the WHM page instead.

Screenshot: This command adds the user to the compiler group. Replace username with the real account n

Test it

  1. Log in as the user with SSH.
  2. Run:
gcc --version

If the user is allowed, it prints the version. If not, you see "Permission denied".

Warning: Only give compiler access to people you trust. It makes a hacked account more dangerous.

Tip: Turn it back off when the user has finished installing their software.

Quick recap

  • A compiler turns code into a working program.
  • Use Compiler Access in WHM to switch it on or off.
    Screenshot: Use Compiler Access in WHM to switch it on or off.
  • Give it only to trusted users.
  • Test with gcc --version.