Reset CloudLinux cagefs user environment with ease
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team came up with a solution to reset cagefs user environment when its behavior deviated from the norm.
How to reset CloudLinux cagefs user environment
Have you been experiencing trouble with your cPanel account on the CloudLinux server? Sometimes change made do not get reflected due to an error.
For instance, a customer recently ran into an issue where changing the PHP version in cPanel resulted in an incorrect PHP version on the domain’s website. Fortunately, our Support Techs have an easy solution right up their sleeves.
- First, we will change to the cagefs directory and execute these commands:
cd /var/cagefs find . -user $user
- Once we have the user information, we will change to the folder as seen below:
- After that, we will disable cagefs for that specific user with this command:
cagefsctl --disable $user
- Next, we will run these commands to move the users cagefs files:
mkdir /root/cpanelzone mv $user* /root/cpanelzone
- Finally, we have to enable cagefs for that same user with this command:
cagefsctl --enable $user
[Looking for help with another query? We are just a click away.]
To sum up, the skilled Support Engineers at Bobcares demonstrated how to reset the CloudLinux cagefs user environment without any trouble.
showed us how to prevent hostname resets on restart using Virtuozzo.