Login
New User

Welcome to destr0yr's asylum
Thursday, August 07 2008 @ 01:04 PM PDT

cPanel: su: cannot set user id: Resource temporarily unavailable

cPanelI'm not exactly sure how it happened, but when I attempted to "su -" to root this morning, my system spat back the error:

su: cannot set user id: Resource temporarily unavailable

I don't recall changing anything, other than temporarily allowing root SSH access, restarting sshd and changing it back.  The culprit seems to be cPanel and its "Shell Fork Bomb Protection".  Logging into WHM -> Security -> Shell Fork Bomb Protection and clicking "Disable Protection" has resolved the issue.

*UPDATE*  If, however, you would like the security provided by the "Shell Fork Bomb Protection", there is a workaround available as described in the cPanel forums by the user Abhilash V Nair. According to the post, the following edits to the following files are required to make this work (allowing specific users to "su -" while keeping the Fork Bomb Protection enabled). The files:

/etc/profile
/etc/bashrc
/etc/profile.d/limits.sh


In each of the files, find the section that starts, "#cPanel Added Limit Protections -- BEGIN". Within this section, change the appropriate lines to be similar to the following, where "foo" is your specific user:

if [ "$LIMITUSER" = "root" ]; then
      ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
elif [ "$LIMITUSER" = "foo" ]; then
      ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
else
      ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
fi

Story Options

Trackback

Trackback URL for this entry: http://www.destr0yr.com/trackback.php/cPanel-su-ResourceTemporarilyUnavailable

No trackback comments for this entry.
cPanel: su: cannot set user id: Resource temporarily unavailable | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.