Here at Bobcares, we provide Server Administration and Maintenance services to cPanel/WHM server owners.
An error we sometimes see in cPanel servers while trying to SSH is : “Resource temporarily unavailable.”
This error is usually accompanied by the error ‘too many processes’, while trying to do ‘sudo su -‘ command, which is used to elevate the privileges of a wheel user to that of a root user.
What is the error “Resource temporarily unavailable” during SSH
Fork bomb attacks in servers are performed by attackers using a cascade of small processes that duplicate themselves, until the server’s resources are depleted. This is performed via shell.
To protect cPanel servers from such attack, cPanel offers a Fork Bomb Protection. It denies users who have terminal access (SSH/Telnet) from using up all the resources on the server.
This protection is enabled with these steps:
1 Click on Server Setup, on the main WebHost Manager interface.
2 Click on Shell Fork Bomb Protection.
3 Click on Enable Protection.
But, this protection can hinder the normal functioning of SSH access at times, when users cannot SSH or sudo using the account, and instead face the error “Resource temporarily unavailable”.
Today, we’ll look at the reason for this SSH failure, and the fix:
Resolving “Resource temporarily unavailable” error in cPanel servers
This happens because the Shell Fork Bomb Protection that is enabled in WHM. This protection is used to prevent Telnet/SSH users using all of the server resources and causing a system crash.
For example, while trying to SSH as a user to the server, or while trying to elevate the privileges of a wheel user to a root user, you’ll see these errors:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wheel432@wheeluser.com [~]# su -
Password:
su: cannot set user id: Resource temporarily unavailable
wheel432@wheeluser.com [~]# sudo su -
sudo: PERM_ROOT: setresuid(0, -1, -1): too many processes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After you have enabled shell fork bomb protection, the following limits are available to better protect the server:
Limit Description 200000 maximum size of core files created. 100 maximum number of open-file descriptors. 35 maximum number of processes available to a single user. 200000 maximum amount of virtual memory available for the process.
When the user’s limit exceeds the allotted limits of these resources, it can give out “Resource temporarily unavailable” error while trying to SSH your cPanel server.
If you are facing this error and need expert help to fix it, click here to request expert assistance.
How to fix “Resource temporarily unavailable” error in cPanel servers
This error occurs due to shell fork bomb protection enabled in WHM for protecting your cPanel server from resource overload attacks.
The two variations of this error are:
su: cannot set user id: Resource temporarily unavailable
sudo: PERM_ROOT: setresuid(0, -1, -1): too many processes
To fix this, you’ll need to remove the shell fork bomb protection for the server from the WHM => ‘Server Setup’.
If you still face issues, our cPanel experts can fix this for you in an hour. Click here to go to our server administration services page.
Conclusion
“Resource temporarily unavailable” is a class of errors in cPanel & WHM servers. It is shown when users are unable to connect to the server via SSH. Today we’ve seen the common causes for this error, and how to fix them.
0 Comments