• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question Need additional SFTP Accounts

Trosten

New Pleskian
Hallo,

i need additional SFTP Accounts to recieve some secure files from our connected companys and i don't want to open FTP incl. a lot of passive ports

The chroot Folder is into the Domain environment /var/www/vhost/<Domain>/<Folder>
I have found some solutions but nothings works correctly

The last i try was these:
/usr/local/psa/admin/bin/chrootmng --create --source=/var/www/vhosts/chroot/ --target=/var/www/vhosts/<domain>/<Folder> --setup-user=<2nd Web User>

but that opens a whole access to root /

in the /etc/passwd i have this:
<2nd Web User>:x:10001:1003::/var/www/vhosts/<Domain>/<Folder>:/opt/psa/bin/chrootsh

and in /var/www/vhosts/<Domain>/etc/passwd
<2nd Web User>:x:10001:1003::/var/www/vhosts/<Domain>/<Folder>:/bin/bash

Have someone a complete solution to create new User for SFTP with a chrooted Folder?
 
My logfiles from /var/log/auth.log
Nov 29 15:29:16 server sshd[27154]: Accepted password for <2nd Web User> from xxx.xxx.xxx.xxx port 52725 ssh2
Nov 29 15:29:16 server sshd[27154]: pam_unix(sshd:session): session opened for user test1 by (uid=0)
Nov 29 15:29:16 server sshd[27154]: pam_env(sshd:session): Unable to open env file: /etc/default/locale: No such file or directory
Nov 29 15:29:16 server plesk-chrootsh[27167]: user with id=10001 and name=<2nd Web User> not found in chrooted passwd file
Nov 29 15:29:16 server sshd[27154]: pam_unix(sshd:session): session closed for user <2nd Web User>

but which chroot passwd file is the right one?
 
Last edited:
Back
Top