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
Run Laravel queue workers with Supervisor
How to Run Laravel Queue Workers in Production with Supervisor
May 23, 2026
Nginx as a reverse proxy for a Node.js app on Ubuntu
How to Set Up Nginx as a Reverse Proxy for Node.js on Ubuntu
May 23, 2026
Install and configure Redis on Ubuntu for Laravel and WordPress
How to Install and Configure Redis on Ubuntu (for Laravel & WordPress)
May 23, 2026
Harden a fresh Ubuntu VPS with UFW, Fail2Ban, and SSH key auth
How to Harden a Fresh Ubuntu VPS: UFW + Fail2Ban + SSH Key Auth
May 23, 2026
Set up Let's Encrypt SSL with Certbot on Ubuntu
How to Set Up Let’s Encrypt SSL with Certbot on Ubuntu (Apache & Nginx)
May 23, 2026

You Might Also Like

Securely upload only image files in PHP
Web Development

How to Upload Only Image Files Using PHP

6 Min Read
Check if Laravel scheduler is running (cron + php artisan schedule:run)
Web Development

How to Check if Laravel Scheduler Is Running (Cron + Logs)

6 Min Read
Fix DKIM not signing emails in aaPanel
Server Management

How to Fix DKIM Not Signing Emails in aaPanel

5 Min Read
MariaDB restart on Linux — systemctl restart mariadb
Server Management

How to Restart the MariaDB Server on Linux

6 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?