Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

How to enable jailshell through API?

Comments

2 comments

  • Andy Baugh cPanel Staff

    Use modifyacct's "shell" parameter to set the shell for the account:

    https://api.docs.cpanel.net/openapi/whm/operation/modifyacct/

    In this case you'll want the full path to jailshell, which, if I recall correctly, is

     

    /usr/local/cpanel/bin/jailshell

     

    1
  • anton_latvia

    Small update, if it matters for others.

    suggested function can be used to enable/disable shell. But you can not choose between jail or normal shell. If you want to use jailshell - you much set "Use cPanel® jailshell by default" to "ON" in Tweak Settings. Only then this function will actually set jailshell.

    0

Please sign in to leave a comment.