How to rebuild chroot template?




  • Avatar
    Ultra Graphics

    Hello! I tried this method to rebuild the CHROOT that stopped working on our server (essentially /bin/bash (chrooted) connection method stopped working for all 60+ websites over SFTP). I thought this might be the ticket to fix but it didn't work. I did notice that when running through the process it said it couldn't find "bin".  Could that possibly be causing my problem?  I would very much appreciate any guidance you can provide! Thank you.

  • Avatar
    Lev Iurev

    @Ultra Graphics could you please provide us with more details?

  • Avatar
    Ultra Graphics

    I'm afraid I don't know enough to provide more details.  However, I can try to expand on what I found upon further investigation after Jan 12th. I ended up restoring a server backup of everything but the /var/ folder to try to bring back a working chrooted SFTP, then tried using the reinstall method again including removal, update, and apply.  Then I tried switching the subsystem in sshd_config from the /usr/libexec/openssh/sftp-server to internal-sftp, restarting ssh, then switching back, then restarting again.  Either all those things (or some combination of any) caused the chroot to work again.

    Unfortunately, I don't know enough to know what actually fixed it, but I have an idea that it was the restored backup.  After that, I tried to update plesk to 17.5.3, and got an error in the log that lead me to believe that it's the sftp-server that was causing the chroot issue (from the update log):

    Trying to install sftp-server binary into chroot environment... cp: cannot stat '/usr/libexec/openssh/sftp-server\r': No such file or directory
    : cannot open (No such file or directory)
    probably it will not work in chrooted accounts

    Which led me down a completely different path of trying to figure out why. I'm now looking into the idea of using internal-sftp instead to see if I can get a more long-term reliable chroot for my customers, and I don't know that my issue was specifically related to the implementation of this support article. I appreciate you following up!

  • Avatar
    Ivan Postnikov

    @Ultra Graphics


    As I can see the described symptoms are different from the article.

    In case the further investigation is required, contact Plesk Technical Support.

Please sign in to leave a comment.

Have more questions? Submit a request