How7o
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Reading: How to Enable CageFS for a User on CloudLinux / cPanel
Share
How7oHow7o
Font ResizerAa
  • OS
Search
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Follow US
© 2024–2026 How7o. All rights reserved.
How7o > Free Laravel, PHP, WordPress & Server Tutorials > Server Management > How to Enable CageFS for a User on CloudLinux / cPanel
Server Management

How to Enable CageFS for a User on CloudLinux / cPanel

how7o
By how7o
Last updated: May 22, 2026
5 Min Read
Enable CageFS for a user on CloudLinux — cagefsctl CLI and CloudLinux Manager
SHARE

To enable CageFS for a user on CloudLinux, run cagefsctl --enable <username> on the server, or use the CloudLinux Manager toggle in WHM. CageFS is CloudLinux’s per-user filesystem cage — once enabled, the user can only see their own files and a sanitized view of the system, which blocks symlink attacks and is the main reason shared hosting on CloudLinux is safer than vanilla cPanel.

Contents
  • TL;DR
  • Enable from the command line
  • Enable from WHM
  • Verify
  • Disable (rarely)
  • Frequently asked questions
  • Related guides
  • References

Last verified: 2026-05-17 on CloudLinux 9 with cPanel/WHM 11.118+. Originally published 2023-03-22, rewritten and updated 2026-05-17.

TL;DR

# Enable CageFS for a single user
/usr/sbin/cagefsctl --enable username

# Enable for every user on the server
/usr/sbin/cagefsctl --enable-all

# Disable for one user (rarely needed)
/usr/sbin/cagefsctl --disable username

# See who's in and who's out
/usr/sbin/cagefsctl --enabled-users
/usr/sbin/cagefsctl --disabled-users

Enable from the command line

SSH into the server as root, then enable CageFS for a specific username:

/usr/sbin/cagefsctl --enable username

To enable CageFS for every user at once (typical for a new server, or after a CageFS install):

/usr/sbin/cagefsctl --enable-all

Both commands return immediately and don’t require restarting Apache or PHP-FPM — the change takes effect on the user’s next request.

Enable CageFS for a user — CLI cagefsctl command and WHM CloudLinux Manager toggle

Enable from WHM

  1. Log into WHM as root.
  2. Open CloudLinux Manager.
  3. Click the Users tab.
  4. Find the username; flip the CageFS toggle to on.

The toggle calls the same cagefsctl --enable on the backend. Use the CLI for scripting (bulk operations, automation); use the WHM UI for one-off changes.

Verify

# Status for a specific user
/usr/sbin/cagefsctl --user-status username

# List everyone currently enabled
/usr/sbin/cagefsctl --enabled-users

# List everyone outside the cage
/usr/sbin/cagefsctl --disabled-users

Disable (rarely)

/usr/sbin/cagefsctl --disable username

Disabling removes the isolation, which is the whole reason CageFS exists. Only disable as a diagnostic step when troubleshooting an application that doesn’t play well with the cage, and re-enable after solving the root cause.

Frequently asked questions

What does CageFS actually do?

CageFS is CloudLinux’s per-user filesystem virtualization. Each user gets their own jailed view of the filesystem — they see only their own files, a limited set of system binaries, and isolated /tmp, /proc, and devices. This blocks symlink attacks, prevents one user from reading another user’s PHP source, and is one of the main reasons shared hosting can be relatively safe.

Why are some users not in CageFS by default?

Two common reasons: (1) the account was created before CageFS was installed on the server — CageFS wraps existing users only when explicitly enabled, and (2) certain CloudLinux features (LVE selection by hostname, some legacy compatibility modes) leave users outside the cage. The fix is the same: run cagefsctl --enable <user> or use the WHM toggle.

How do I confirm CageFS is enabled for a user?

/usr/sbin/cagefsctl --enabled-users lists every user currently in the cage. /usr/sbin/cagefsctl --disabled-users lists those outside. To check one specific user: cagefsctl --user-status <username> returns Enabled or Disabled.

Will enabling CageFS break my user’s site?

Usually no — CageFS is designed to be transparent to PHP applications. The most common breakage is when a script depends on a system binary that isn’t in the cage’s allowed-binaries list. The fix is to add that binary via cagefsctl --addrpm <pkg> or to copy the file into /etc/cagefs/conf.d/. Most stock LAMP applications (WordPress, Laravel, generic PHP) need no changes.

How do I disable CageFS for a single user?

/usr/sbin/cagefsctl --disable <username>. Use sparingly — disabling the cage removes the isolation, which is the main reason to be on CloudLinux at all. If you need to disable it to fix a specific incompatibility, do that as a diagnostic step then re-enable after solving the root cause.

Related guides

  • How to Access aaPanel with a Domain and Let’s Encrypt SSL
  • How to Install Docker on AlmaLinux

References

CloudLinux CageFS reference: docs.cloudlinux.com/cloudlinux_os_components/cagefs.html. cagefsctl CLI options: docs.cloudlinux.com — cagefsctl options.

TAGGED:CloudLinuxconfigurationcPanelSecurity

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article PHP add days to a date — strtotime and DateTimeImmutable side by side How to Add Days to a Date in PHP
Next Article Linux add and delete users from the terminal — adduser, passwd, sudo group, userdel How to Add and Delete Users on a Linux Server from the Terminal
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

FacebookLike
XFollow
PinterestPin
InstagramFollow
Most Popular
Set vi as the default editor in Ubuntu — a terminal opening the vim editor
How to Set vi (Vim) as the Default Editor in Ubuntu
June 8, 2026
rsync says ALL DONE but files are missing — a terminal showing ALL DONE next to an empty folder
rsync Says “ALL DONE” but Files Are Missing: How to Verify
June 8, 2026
Migrate a website to a new server with rsync — files copying from an old server to a new one over SSH
How to Migrate a Website to a New Server With rsync
June 8, 2026
Bun runtime — faster JS toolkit replacing npm in Laravel projects
How to Install Bun Runtime on Ubuntu (And Use It in a Laravel Project)
May 24, 2026
Tailscale mesh — peer-to-peer connections between devices, coordination server
How to Install Tailscale on Ubuntu (Zero-Config Mesh VPN for Self-Hosters)
May 24, 2026

You Might Also Like

Step-by-step guide to upgrading the Linux kernel in CentOS 7 using ELRepo
Server Management

How to Upgrade the Linux Kernel in CentOS 7

9 Min Read
SSH key authentication — keypair, terminal window, lockout-protection parallel session
Server Management

How to Set Up SSH Key Authentication on Ubuntu (Without Locking Yourself Out)

14 Min Read
Extract a .tar.gz archive in PHP with PharData
Web Development

How to Extract a .tar.gz Archive in PHP

5 Min Read
yum/dnf -y flag explained
Server Management

What Does the -y Flag Do in yum / dnf / apt-get?

5 Min Read
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Tools

  • Age Calculator
  • Word Counter
  • Image Upscaler
  • Password Generator
  • QR Code Generator
  • See all tools→

Pranks

  • Fake Blue Screen Prank
  • Hacker Typer
  • Fake iMessage Generator
  • Windows XP Crash Prank
  • Windows 11 Update Prank
  • See all prank screens →

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service
  • Sitemap
© 2024–2026 How7o. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?