Symptoms
When trying to su
into a user's shell, you receive an error similar to the following.
[root@server ~]cPs# su -l cpusername -s /bin/bash
Error: user or UID cpusername does not exist
su: cannot open session: Cannot make/remove an entry for the specified session
Additionally, files or folders under the cPanel user's .cagefs
folder are not owned by the cPanel user.
Description
This issue occurs due to one or more files or folders under the user's .cagefs
folder having incorrect ownership, preventing a shell session from being established.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command to locate files and folders not owned by the cPanel user and correct the ownership.
user="$cpusername"; find /home/$user/.cagefs -path /home/$user/.cagefs/tmp -prune -o ! -user $user -exec chown $user. {} \;
Please note that "$cpusername" must be replaced with the cPanel user's username.
Also note that the
tmp
folder under.cagefs
must be excluded because it contains socket files that should not be owned by the cPanel user.
Comments
0 comments
Article is closed for comments.