Recommended Shell Access setting

coursevector

Well-Known Member
Feb 23, 2015
162
28
68
cPanel Access Level
Root Administrator
On our servers, we have shell access set to "Disabled Shell", yet in the Security Advisor it says we need to set it to "Jail Shell". Would "Jail Shell" be preferred to "Disabled Shell"?

Apache vhosts are not segmented or chroot()ed.Enable “Jail Apache” in the “Tweak Settings” area, and change users to jailshell in the “Manage Shell Access” area. Consider a more robust solution by using “CageFS on CloudLinux”​
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @coursevector,

The recommendation is suggesting that you enable the following option under the "Security" tab in WHM >> Tweak Settings:

EXPERIMENTAL: Jail Apache Virtual Hosts using mod_ruid2 and cPanel® jailshell.

Per it's description:

If mod_ruid2 is compiled in via EasyApache, mod_ruid2 is enabled, and a user has their shell set to jailshell or noshell, enabling this option will chroot() a user's Apache Virtual Host into the cPanel® jailshell environment. Each user will require 14 bind mounts. While modern Linux supports a very large number of bind mounts, many processes read /proc/mounts. Reading /proc/mounts can be quite expensive when it becomes large.

As noted in the description, it works for users with jailed shell or no shell access. The only accounts you'd switch to jailed shell are the ones with normal shell access.

Thank you.
 

coursevector

Well-Known Member
Feb 23, 2015
162
28
68
cPanel Access Level
Root Administrator
I don't run mod_ruid2 currently. Looking at the dependencies, I would have to give up mod_http2 and mod_mpm_event in order to switch to mod_mpm_prefork and us mod_ruid2. That sounds like a step backwards.

We don't allow shell access for the cpanel accounts on the WHM server. Is your advice still applicable?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @coursevector,

Disabling shell access for the accounts will not mitigate the Apache vhosts are not segmented or chroot()ed. issue reported by Security Advisor. Another alternative is to use CageFS with CloudLinux. You can find additional discussion of this topic on the following thread:

Apache vhosts are not segmented or chroot()ed

Thank you.
 

coursevector

Well-Known Member
Feb 23, 2015
162
28
68
cPanel Access Level
Root Administrator
That thread was very helpful, thanks. I guess I'm just surprised the requirements to use mod_ruid2. It definitely does sound like cPanel has just left their JailShell system to rust while pushing CageFS instead. Stepping backwards just to secure accounts vs using the NEW mod_http2 (which is incompatible with mod_ruid2) but needs CageFS to be secured properly. I would expect cPanel to offer a comparable system to secure the new features as well as they did the older features.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @coursevector,

I encourage you to open a feature request if you'd like to see a CageFS equivalent feature integrated with cPanel & WHM itself:

Submit A Feature Request

Our feature request website is the best way to request a change or addition to the product.

Thanks!