• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

[SOLVED] SFTP: Chrooted SFTP not working (CentOS 7)

danmatter

New Pleskian
Hi everyone

Since the migration from Plesk 11.5 to Plesk 12.0 the "chrooted" SFTP accounts do not work anymore. Along with the Plesk migration we have changed the operating system too. We've migrated from CentOS 6 (x86_64) to CentOS 7 (x86_64).

When trying to connect using SFTP on the command line I get the following error message:
debug1: Exit status 127

When using an SFTP client such as WinSCP I get logged out immediately without any message.

The OpenSSH configuration is saying:
<...>
Subsystem sftp /usr/libexec/openssh/sftp-server
<...>

The mentioned binary from above does exist:
ls -l /usr/libexec/openssh/sftp-server
-rwxr-xr-x 1 root root 83984 2015-05-12 21:41:56 /usr/libexec/openssh/sftp-server

I have attached the debug output of the SFTP command (plesk_sftp_issue.txt).

When I change the option "Access to the server over SSH" to "/bin/bash" the SFTP access works again. But when "chrooted" it stops working.

Is anyone else experiencing the same issue with Plesk 12 under CentOS 7?

Please let me know if you need additional information.

Thank you for your help.
 

Attachments

  • plesk_sftp_issue.txt
    8.9 KB · Views: 12
  • 01_sftp.PNG
    01_sftp.PNG
    13.6 KB · Views: 10
  • 02_sftp.PNG
    02_sftp.PNG
    39.7 KB · Views: 9
I might have a solution, in case anyone else is experiencing the same issue.

The "Migration & Transfer Manager" somehow migrated old libraries from CentOS 6 to CentOS 7. It copied/synced the following directory to the new server:
/var/www/vhosts/chroot/

The directory is holding libraries which were outdated on CentOS 7:
/var/www/vhosts/chroot/usr/lib/
/var/www/vhosts/chroot/usr/lib64/

Make sure your "libnss_*.so" libraries are not from an old installation i.e. CentOS 6.

HTH
 
I might have a solution, in case anyone else is experiencing the same issue.

The "Migration & Transfer Manager" somehow migrated old libraries from CentOS 6 to CentOS 7. It copied/synced the following directory to the new server:
/var/www/vhosts/chroot/

The directory is holding libraries which were outdated on CentOS 7:
/var/www/vhosts/chroot/usr/lib/
/var/www/vhosts/chroot/usr/lib64/

Make sure your "libnss_*.so" libraries are not from an old installation i.e. CentOS 6.

HTH

Hey, can you elaborate on all the steps you took to fix this? I have the exact same issue.

Did you move files around or just link to the proper places?
 
Back
Top