Some "SSH & exec" Questions

t_lababidi

Member
Feb 19, 2007
8
1
153
hi h ave some questions about SSH and exec php function
i have Cloudlinux and i am using CageFS with normal php ea-*

1 - what the difference between ( Normal Shell & Jailed Shell ) without CageFS ?
2 - what the difference between ( Normal Shell & Jailed Shell ) with CageFS: note that i am using CageFS ?
3 - if i am using "exec" php function , is it safe with CageFS and ( Normal Shell & Jailed Shell ) ?
4 - if i am using "shell_exec" php function , is it safe with CageFS and ( Normal Shell & Jailed Shell ) ?


thanks
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
1 - what the difference between ( Normal Shell & Jailed Shell ) without CageFS ?
Normal Shell grants the user access to ssh without limitations
Jailed Shell grants the user access to ssh with limited ability to run commands VirtFS Jailed Shell | cPanel & WHM Documentation

2 - what the difference between ( Normal Shell & Jailed Shell ) with CageFS: note that i am using CageFS ?
The difference between the two is the same with or without CageFS - the difference is CageFS which runs everything in the user's own container so to speak. You can read more about it here: CloudLinux - Main | New template
Generally speaking if you're using CloudLinux you should put your users in normal shell not jailed shell. This is discussed here: CageFS - Does it matter if user has Jailed or Regular shell?
3 - if i am using "exec" php function , is it safe with CageFS and ( Normal Shell & Jailed Shell ) ?
exec allows a user to execute an external program, it would be more safe to allow this via cagefs than any other method
4 - if i am using "shell_exec" php function , is it safe with CageFS and ( Normal Shell & Jailed Shell ) ?
shell_exec allows a user to execute a command via shell and return the complete output as a string