Skip to content

Jail Shell, noshell, and Normal Shell on cPanel — when to grant which

Learn when to grant Normal Shell, Jail Shell, or noshell to a cPanel account, and what each tier actually restricts on a shared host. You will get a default-to-noshell rule and a command that audits the shell every tenant currently has.

This article walks you through cPanel’s three shell-access levels and helps you pick the right one for each account on a shared server. The usual trigger is a customer asking for SSH (Secure Shell, the encrypted remote-login protocol), and nobody being sure how much of the machine that opens up. The short answer is to default new accounts to noshell, which refuses an interactive login but still lets them transfer files over SFTP (SSH File Transfer Protocol) and push to Git. Use Jail Shell, a chroot-style wrapper that hides most of the server, when someone needs to run their own scripts; Normal Shell, plain bash with no limits, stays for operator accounts. By the end you will have a default rule and a command that audits the shell every tenant currently holds.

What’s happening

cPanel’s shell-access tiers control what happens when a user opens SSH. Normal Shell drops them into bash with no restrictions beyond filesystem permissions. Jail Shell uses jailshell, which is a chroot-style wrapper that hides most of the system and most cross-account paths. noshell rejects the SSH session entirely but still lets the user authenticate for SFTP and Git over SSH. CageFS (CloudLinux) is a separate, stronger isolation layer that applies even to Jail Shell users.

How to verify

whmapi1 list_users | grep -E "user|shell"
grep -E "shell=" /etc/passwd | grep -E "(jailshell|noshell|/bin/bash)" | head
ls -la /usr/local/cpanel/bin/jailshell
ls /etc/cpanel/ea4/php.versions 2>/dev/null
for u in $(awk -F: '$3>=500 {print $1}' /etc/passwd); do \
  getent passwd $u | awk -F: '{print $1 ":" $7}'; done

The last loop is a tenant-by-tenant audit of what shell every cPanel user actually has.

The fix

  1. Default new accounts to noshell in WHM > Account Functions > Manage Shell Access > Default for new accounts. If they need shell, they will ask.
  2. Grant noshell when the user only needs SFTP, Git deploy, or rsync. This covers the majority of customers. No interactive shell means no surface for a stolen-password attacker to land on.
  3. Grant Jail Shell when the user needs to run scripts, use composer/npm, or troubleshoot their own application. Pair with CageFS if available — Jail Shell alone is not a strong isolation boundary.
  4. Grant Normal Shell only to operator accounts and to customers running custom daemons under their account (rare). Document the justification for every Normal Shell grant.
  5. Audit quarterly: anyone with Normal Shell on a customer account should justify it, or be downgraded.
  6. For staging/development tenants who genuinely need root-like capability on their own slice, Stack Harbor recommends moving them off shared hosting onto a dedicated VM under environment management rather than escalating shell privileges on a shared cPanel host.