Understanding .cagefs in cPanel — What It Is and How to Fix Issues
What is .cagefs?
.cagefs is part of CloudLinux CageFS, a virtualized filesystem that isolates each cPanel user's environment. It enhances security by preventing users from accessing each other's files and system resources.
For closely related CloudLinux / cagefs topics, see Understanding the .cagefs Folder in CloudLinux (sysadmin overview), How to Safely Delete .cagefs/tmp Files, Understanding .cagefs/tmp, and CloudLinux Hosting — Why Is It Secure?.
Benefits of CageFS:
- Improves security by isolating users.
- Prevents privilege escalation and unauthorized access.
- Limits resource usage to prevent server overload.
The .cagefs folder is usually found in:
/home/username/.cagefs/
Common Issues & Fixes Related to .cagefs
Error: "No such file or directory inside .cagefs"
If .cagefs is missing or corrupt, users may experience website errors or command failures.
Fix: Remount CageFS for the User
Run the following command:
cagefsctl --force-update
cagefsctl --enable username
cagefsctl --remount username
Replace username with the actual cPanel username.
Restart CageFS:
cagefsctl --remount-all
Error: "Permission denied" when accessing files in .cagefs
If a user cannot access files inside .cagefs, it might be due to incorrect permissions.
Fix: Reset Permissions for the User
cagefsctl --remount username
To reset for all users:
cagefsctl --remount-all
If the issue persists, force an update:
cagefsctl --force-update
Error: "Command not found" inside .cagefs
Sometimes, users cannot run basic commands like php, ls, or wget inside CageFS.
Fix: Update CageFS Skeleton
cagefsctl --update
If that does not work, reinitialize the environment:
cagefsctl --reinit
Remove .cagefs for a User (Disable CageFS)
If you want to completely disable CageFS for a specific user:
Disable CageFS for One User
cagefsctl --disable username
Disable CageFS for All Users
cagefsctl --disable-all
This should only be done if necessary, as disabling CageFS removes security protections.
Summary of Fixes
| Issue | Fix |
|---|---|
| Missing .cagefs folder | Run cagefsctl --force-update |
| Permission denied inside .cagefs | Run cagefsctl --remount username |
| Commands not found inside CageFS | Run cagefsctl --update or cagefsctl --reinit |
| Disable CageFS for a user | Run cagefsctl --disable username |
Now CageFS should work properly, and your users will be securely isolated!


