Articles in this section

Operation in Plesk fail with "Error: no secure shell available": chroot: failed to run command ‘/bin/bash’: Permission denied

Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • An attempt to perform one of the following operations in Plesk:

    • Create a subscription
    • Change the FTP account password
    • Change the domain's PHP handler in Domains > example.com > PHP Settings
    • Deploy an application (e.g., WordPress)
    • Settings Permanent SEO-safe 301 redirect from HTTP to HTTPS at Plesk > Domains > example.com > Hosting settings

    The operation fails with the following error:

    PLESK_ERROR: Error: no secure shell available

  • The solution from the following article does not help: Some Plesk operation failed: Error: no secure shell available

  • Plesk is unable to detect chrooted shell:

    # plesk sbin sysinfo getshell | grep -c chrootsh
    0

    In case the previous command returns 1, Plesk detects that chrooted shell but it's not present in the database:

    # plesk db "select * from ServiceNodeEnvironment where name = 'availableShells'" | grep -c chrootsh
    0

  • In the corresponding service plan, Setup of potentially insecure web scripting options that override provider's policy option is disabled.

  • Also, it may not be possible to spawn a chrooted shell:

    # chroot /var/www/vhosts/chroot/
    chroot: failed to run command ‘/bin/bash’: Permission denied

Cause

Due to the chrooted shell cannot be started, it is removed from the available components list.

Resolution

  1. Connect to the server via SSH

  2. Restore chroot template according to the instructions available in the following KB article: How to rebuild chroot template?

  3. Log in to Plesk GUI

  4. Go to Tools & Settings > Server Components and click on Refresh to update the available components cache

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.